#!/bin/sh
#
# install.sh	Does nothing more then piping "install.cpp"
#		through the preprocessor, and then running
#		the cpp'ed shell script.
#

[ -x /lib/cpp ] && CPP=/lib/cpp
[ -x /bin/cpp ] && CPP=/bin/cpp
[ -x /usr/bin/cpp ] && CPP=/usr/bin/cpp

if [ "$CPP" = "" ]
then
	echo "install: cpp (C PreProcessor) not found - quitting."
	exit 1
fi

while [ $# != 0 ]
do
  case "$1" in
	ROOTDIR=*)
	  eval $1
	  export ROOTDIR
	  ;;
	*)
	  args="$args $1"
	  ;;
  esac
  shift
done

$CPP $args < Install.cpp > install.out
chmod 755 install.out
./install.out
rm install.out
