
PATH=`pwd`/tmp:$PATH export PATH

trap 'echo "\n\nInterrupted";
      echo "============ Interrupted ================" >> errorlog;
      deinstall all;
      exit 4' 1 2 4 9 15

install

case $? {
  0) echo "\n Installation completed successfully."
     echo " Please remove the installation media and store in a safe place.\n\n"
     echo " To run MultiView you now need to reboot the system.\n\n"
     echo " If in Multiuser Mode ensure all users are logged off."
     echo " Then shutdown the system in the normal manner.\n"
	CURRDIR=`pwd`
	LOGNAME=`whoami`
	TODAY=`date`
	PRODUCT="Altos Multiview"
	VERSION="1.6.2S0"
	echo "$PRODUCT|$VERSION|$TODAY|$LOGNAME|$CURRDIR" >> /etc/install.log
     exit 0
     ;;
  1) deinstall only
     echo "\nInstallation aborted."
     exit 1
     ;;
  2) echo "\nInstallation failed."
     exit 1
     ;;
  4) echo "\nInstallation interrupted."
     exit 1
     ;;
  *) deinstall all
     echo "\nInstallation unsuccessful."
     exit 1
     ;;
}
