#!/bin/sh
####################################
#
# makeinstall 1.94
#
# installs $* to INSTALLDIR
#
####################################

echo "MakeInstall 1.94"
echo

##### First determine if there is a directory
##### to install to

if [ "$INSTALLDIR" = "" ]; then
  echo "No installation directory specified, not installing."
  exit
fi

##### Now just begin installing

echo "Installing to $INSTALLDIR"


##### Make the installdir if it doesn't exist

if [ ! -x $INSTALLDIR ]
then
  mkdir $INSTALLDIR
fi

##### Install the things to install

for i in $*
do
  echo "  installing $i"
  tar cf /tmp/makeinstall.$$ $i
  (cd $INSTALLDIR; tar xf /tmp/makeinstall.$$)
done
rm -f /tmp/makeinstall.$$

##### If we've got another script to execute
##### with this installation, execute it.

if [ "$INSTALLEXE" ]
then
  echo "executing INSTALLEXE=$INSTALLEXE"
  $INSTALLEXE $*
fi

##### We're ready

echo "done."
echo


