distribution/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh

45 lines
1.1 KiB
Bash
Raw Normal View History

2023-04-14 21:20:18 +00:00
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
jslisten set "-9 drastic"
2023-04-14 21:20:18 +00:00
#Copy drastic files to .config
if [ ! -d "/storage/.config/drastic" ]; then
mkdir -p /storage/.config/drastic/
cp -r /usr/config/drastic/* /storage/.config/drastic/
fi
if [ ! -d "/storage/.config/drastic/system" ]; then
mkdir -p mkdir -p /storage/.config/drastic/system
fi
for bios in nds_bios_arm9.bin nds_bios_arm7.bin
do
2023-06-12 16:15:36 +00:00
if [ ! -e "/storage/.config/drastic/system/${bios}" ]; then
if [ -e "/storage/roms/bios/${bios}" ]; then
ln -sf /storage/roms/bios/${bios} /storage/.config/drastic/system
fi
fi
done
2023-04-14 21:20:18 +00:00
#Make drastic savestate folder
if [ ! -d "/storage/roms/savestates/nds" ]; then
mkdir -p /storage/roms/savestates/nds
fi
#Link savestates to roms/savestates/nds
rm -rf /storage/.config/drastic/savestates
ln -sf /storage/roms/savestates/nds /storage/.config/drastic/savestates
#Link saves to roms/nds/saves
rm -rf /storage/.config/drastic/backup
ln -sf /storage/roms/nds /storage/.config/drastic/backup
cd /storage/.config/drastic/
./drastic "$1"