distribution/packages/emulators/standalone/flycast-sa/scripts/start_flycastsa.sh

26 lines
686 B
Bash
Raw Normal View History

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
2023-03-30 23:45:49 +00:00
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /etc/profile
2023-03-30 23:45:49 +00:00
#Check if flycast exists in .config
if [ ! -d "/storage/.config/flycast" ]; then
mkdir -p "/storage/.config/flycast"
cp -r "/usr/config/flycast" "/storage/.config/"
fi
2023-03-30 23:45:49 +00:00
#Make flycast bios folder
if [ ! -d "/storage/roms/bios/dc" ]; then
mkdir -p "/storage/roms/bios/dc"
fi
2023-03-30 23:45:49 +00:00
#Link .config/flycast to .local
rm -rf "/storage/.local/share/flycast"
ln -sf "/storage/.config/flycast" "/storage/.local/share/flycast"
ln -sf "/storage/roms/bios/dc" "/storage/.local/share/flycast"
2023-03-30 23:45:49 +00:00
#Run flycast emulator
/usr/bin/flycast "${1}"