saturnng/dist/saturn40g
Gwenhael Le Moine b4ffa28a15
fix rom.39g
2024-08-25 18:01:16 +02:00

25 lines
627 B
Bash
Executable file

#!/bin/bash -eu
STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
STATEDIR=$STATE_HOME/saturn/40g
mkdir -p "$STATEDIR"
if [ ! -e "$STATEDIR"/rom.39g ]; then
if [ ! -d @PREFIX@/share/saturn/ROMs/ ]; then
echo "Error: No ROMs/ dir found"
exit 1
fi
if [ ! -d "$STATEDIR"/../ROMs ]; then
cp -R @PREFIX@/share/saturn/ROMs/ "$STATEDIR"/../ROMs
fi
make -C "$STATEDIR"/../ROMs rom.39g
cp "$STATEDIR"/../ROMs/rom.39g "$STATEDIR"/rom.39g
fi
RAM=''
if [ ! -e "$STATEDIR"/ram ]; then
RAM=-reset
fi
@PREFIX@/bin/saturn -face hp40 -hw hp40 -stateDir "$STATEDIR" -rom rom.39g $RAM "$@"