2017-07-17 04:56:17 +00:00
|
|
|
#!/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
|
|
|
|
|
2019-07-15 04:28:25 +00:00
|
|
|
DISKIMAGE="$1"
|
|
|
|
if echo $DISKIMAGE | grep -v '^/' > /dev/null
|
|
|
|
then
|
|
|
|
DISKIMAGE="$PWD/$DISKIMAGE"
|
|
|
|
fi
|
|
|
|
|
2017-07-17 04:56:17 +00:00
|
|
|
cd make
|
2019-07-15 04:28:25 +00:00
|
|
|
sed -i "" "s:^s7d1 *=.*$:s7d1 = $DISKIMAGE:" config.txt
|
2017-07-17 04:56:17 +00:00
|
|
|
|
2017-08-30 03:27:04 +00:00
|
|
|
# This magic ensure that clicking stop in Xcode results in the emulator terminating.
|
|
|
|
|
|
|
|
$EMULATORPATH &
|
|
|
|
PID=$!
|
|
|
|
|
|
|
|
trap 'kill $PID' SIGTERM SIGINT SIGHUP EXIT
|
|
|
|
wait
|
2017-07-17 04:56:17 +00:00
|
|
|
|
|
|
|
exit 0
|