commit
c6200179d5
5 changed files with 14 additions and 8 deletions
|
@ -3,11 +3,7 @@
|
|||
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
||||
|
||||
PICO_DIR="/storage/roms/pico-8"
|
||||
if [ ! -d "${PICO_DIR}" ]
|
||||
if [ -d "${PICO_DIR}" ]
|
||||
then
|
||||
mkdir "${PICO_DIR}"
|
||||
touch "${PICO_DIR}/Splore.png"
|
||||
fi
|
||||
|
||||
# Suggest removing this and replacing it with a file called Splore.png
|
||||
# cp -f "/usr/bin/start_pico8.sh" "${PICO_DIR}/Start Pico-8.sh"
|
||||
touch "${PICO_DIR}/Splore.png"
|
|
@ -16,6 +16,12 @@ function unmount() {
|
|||
umount -f "${1}" 2>/dev/null ||:
|
||||
}
|
||||
|
||||
function add_readme() {
|
||||
cat <<EOF >/storage/roms/README
|
||||
Use the \`Create Game Directories\` option in \`System Settings\` to create your game directories.
|
||||
EOF
|
||||
}
|
||||
|
||||
function start_ms() {
|
||||
### Entrypoint will be either games card found (external), or not found (internal).
|
||||
MOUNT_PATH="/storage/games-${1}"
|
||||
|
@ -75,6 +81,7 @@ then
|
|||
elif [[ "${MOUNT_GAMES}" == "0" ]]
|
||||
then
|
||||
start_ms internal
|
||||
add_readme
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -134,6 +141,7 @@ function mount_games() {
|
|||
/usr/bin/busybox mount ${1} ${MOUNT_PATH} >/dev/null 2>&1
|
||||
fi
|
||||
start_ms external
|
||||
add_readme
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -178,6 +186,7 @@ function find_games() {
|
|||
set_setting system.merged.device internal
|
||||
fi
|
||||
start_ms internal
|
||||
add_readme
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ case "${1}" in
|
|||
systemctl reboot
|
||||
;;
|
||||
"ALL")
|
||||
systemctl stop ${UI_SERVICE}
|
||||
swapoff -a
|
||||
cd /
|
||||
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' -a ! -regex '^/storage/games-*' \) -delete
|
||||
mkdir /storage/.config/
|
||||
|
|
|
@ -40,6 +40,7 @@ then
|
|||
done
|
||||
|
||||
fi
|
||||
|
||||
mkdir -p /storage/.config/modprobe.d >/dev/null 2>&1
|
||||
touch /storage/.configured >/dev/null 2>&1
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Unit]
|
||||
Description=Setup User config dir
|
||||
DefaultDependencies=no
|
||||
After=systemd-tmpfiles-setup.service
|
||||
After=systemd-tmpfiles-setup.service jelos-automount.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
Loading…
Reference in a new issue