distribution/packages/emulators/standalone/drastic-sa/scripts/start_drastic.sh
2023-04-14 21:20:18 +00:00

29 lines
773 B
Bash

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
#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
#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"