libx48ng/dist/setup-x48ng-home.sh

26 lines
520 B
Bash
Raw Normal View History

2023-04-30 19:08:53 +02:00
#!/usr/bin/env sh
2023-04-30 18:50:24 +02:00
2023-05-14 16:20:09 +02:00
DOTX48NG=${DOTX48NG:-.x48ng}
2023-04-30 18:50:24 +02:00
2023-05-14 16:32:15 +02:00
ROM=${ROM:-@PREFIX@/share/x48ng/ROMs/gxrom-r}
2023-04-30 19:08:53 +02:00
2023-05-14 16:20:09 +02:00
[ -d ~/${DOTX48NG} ] && rm -fr ~/${DOTX48NG}
mkdir -p ~/${DOTX48NG}
2023-04-30 19:08:53 +02:00
2023-05-14 16:20:09 +02:00
cp $ROM ~/${DOTX48NG}/rom.dump
cp ~/${DOTX48NG}/rom.dump ~/${DOTX48NG}/rom
cd ~/${DOTX48NG}
2023-04-30 18:50:24 +02:00
2023-05-14 16:20:09 +02:00
PORT1_SIZE=128K
PORT2_SIZE=4M
2023-04-30 18:50:24 +02:00
2023-05-14 16:20:09 +02:00
if $(echo $ROM | grep -q "^sx"); then
PORT2_SIZE=128K
fi
@PREFIX@/share/x48ng/mkcard $PORT1_SIZE port1
@PREFIX@/share/x48ng/mkcard $PORT2_SIZE port2
cd ~/${DOTX48NG}/
@PREFIX@/bin/x48ng -home ${DOTX48NG} -verbose -initialize