629647deaf
* Move post-update a little earlier, and stop rebooting after the update completes as it should no longer be necessary. * Migrate games from games-{internal,external} to games-{internal,external}/roms to allow upper/lower directory switching. * If there is no defined upper setting, and there is an external card available, preference the card so modifications to /storage/roms are hosted there as expected. * Corrects factory reset to ignore new games paths.
23 lines
702 B
Bash
Executable file
23 lines
702 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert)
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
|
|
|
case "${1}" in
|
|
"retroarch")
|
|
rm -f /storage/.config/retroarch/retroarch.cfg
|
|
cp -rf /usr/config/retroarch/retroarch.cfg /storage/.config/retroarch/retroarch.cfg
|
|
;;
|
|
"mednafen")
|
|
rm -f /storage/.config/mednafen/mednafen.cfg
|
|
;;
|
|
"ALL")
|
|
systemctl stop ${UI_SERVICE}
|
|
cd /
|
|
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' -a ! -regex '^/storage/games-*' \) -delete
|
|
mkdir /storage/.config/
|
|
sync
|
|
systemctl reboot
|
|
;;
|
|
esac
|