#!/bin/sh

# Anjuta missing script used by Anjuta
# Should not be used manually

# Copyright (c) 2000 Kh. Nabakumar
# This is a free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:

for anj_option
do
  case "$anj_option" in
  -version | --version | --ver | --ver)
    echo "anjuta_missing version 0.1.1";
    exit 0 ;;

  -help | --help | --hel | --he | --h | -h)
    cat << EOF

*WARNING* To be used by anjuta. Not to be used manually *WARNING*

Usage: anjuta_missing [options] input-file output-file
Options: [defaults in brackets after descriptions]

  --help                    print this message
  --version=VERSION         Version of the project
  
EOF
    exit 0 ;;

  esac
done

if [ "x$#" != "x2" ] ; then
  echo "anjuta_missing: error: Invalid arguments" 
  exit -1;
fi

input=$1
output=$2
files=`cat $input 2> /dev/null`

echo " ">"$output"
echo "Anjuta: Searching for installed programs ..."

for coin in $files
do
  found=`which $coin 2>/dev/null`
  if [ "x$found" != "x" ]; then
     echo "$coin" >> "$output"
  else
     echo "    Not found: $coin"
  fi
done
