#!/bin/bash
#
# This script file is called by the OS X Installer before installing any
# files. If this script returns 0, the installation will procede. If this
# script returns 96, the installation will stop and display a message
# saying the installation could not procede and mention the name of
# the HOBOware application.
#
# InstallCheck is a Java application that checks what version of OS X is
# installed and what version of Java is installed. It returns 0 if these
# are acceptable and non-zero if they are not acceptable.
#
echo ""
echo "==================================================" >>  ~/HOBOwareInstall.txt
date >> ~/HOBOwareInstall.txt
chmod 666 ~/HOBOwareInstall.txt
if "${1%/}/Contents/Resources/InstallCheck.app/Contents/MacOS/JavaApplicationStub"
then
    let retval=0
else
    let retval=96
fi
exit $retval
