Apple2GSBuildPipeline/make/launchEmulator

30 lines
508 B
Bash
Executable File

#!/bin/sh
if [ ! -z "$GSPLUS" ] && [ -x "$GSPLUS" ]
then
EMULATORPATH="$GSPLUS"
elif [ ! -z "$GSPORT" ] && [ -x "$GSPORT" ]
then
EMULATORPATH="$GSPORT"
fi
if [ -z "$EMULATORPATH" ]
then
echo Unable to find GSplus or GSport at these locations.
echo " GSPLUS=$GSPLUS"
echo " GSPORT=$GSPORT"
exit 1
fi
cd make
# This magic ensure that clicking stop in Xcode results in the emulator terminating.
$EMULATORPATH &
PID=$!
trap 'kill $PID' SIGTERM SIGINT SIGHUP EXIT
wait
exit 0