saturnng/dist/saturn49g

26 lines
627 B
Text
Raw Normal View History

2024-08-25 17:39:50 +02:00
#!/bin/bash -eu
STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
STATEDIR=$STATE_HOME/saturn/49g
mkdir -p "$STATEDIR"
if [ ! -e "$STATEDIR"/rom.49g ]; then
if [ ! -d @PREFIX@/share/saturn/ROMs/ ]; then
echo "Error: No ROMs/ dir found"
exit 1
fi
2024-08-25 17:46:42 +02:00
if [ ! -d "$STATEDIR"/../ROMs ]; then
cp -R @PREFIX@/share/saturn/ROMs/ "$STATEDIR"/../ROMs
fi
2024-08-25 17:57:17 +02:00
make -C "$STATEDIR"/../ROMs rom.49g
2024-08-25 17:46:42 +02:00
cp "$STATEDIR"/../ROMs/rom.49g "$STATEDIR"/rom.49g
2024-08-25 17:39:50 +02:00
fi
RAM=''
if [ ! -e "$STATEDIR"/ram ]; then
RAM=-reset
fi
@PREFIX@/bin/saturn -face hp49 -hw hp49 -stateDir "$STATEDIR" -rom rom.49g $RAM "$@"