42 lines
1.5 KiB
Bash
42 lines
1.5 KiB
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
. /etc/profile
|
|
|
|
### This script contains items that we only want to execute after a JELOS upgrade,
|
|
### or after a fresh installation.
|
|
|
|
if [ -d "/storage/.config/system/configs" ]
|
|
then
|
|
EXCLUDE="--exclude=configs"
|
|
fi
|
|
|
|
rsync -a --delete ${EXCLUDE} /usr/config/system/ /storage/.config/system/ &
|
|
rsync -a --ignore-existing /usr/config/game /storage/.config/ &
|
|
rsync -a /usr/config/modules /storage/.config/ &
|
|
|
|
wait < <(jobs -p)
|
|
|
|
cp -f /usr/config/modules/gamelist.xml /storage/.config/modules
|
|
cp -f /usr/config/retroarch/retroarch-core-options.cfg /storage/.config/retroarch/retroarch-core-options.cfg
|
|
rm -rf /storage/roms/ports/JelosAddOns*
|
|
cp -r /usr/share/JelosAddOns /storage/roms/ports/
|
|
mv /storage/roms/ports/JelosAddOns/JelosAddOns.sh /storage/roms/ports/JelosAddOns.sh
|
|
chmod +x /storage/roms/ports/JelosAddOns.sh
|
|
rm -rf /storage/.config/modules/Drastic*
|
|
|
|
if [ -e /usr/config/ssh/authorized_keys ]
|
|
then
|
|
cp /usr/config/ssh/authorized_keys /storage/.ssh
|
|
fi
|
|
|
|
rsync --ignore-existing /usr/config/rsync-rules.conf /storage/.config/
|
|
rsync --ignore-existing /usr/config/rsync.conf /storage/.config/
|
|
|
|
# Swap es_input back to a writeable file so external controller configuration works properly.
|
|
if [ -L "/storage/.config/emulationstation/es_input.cfg" ]
|
|
then
|
|
rm -f /storage/.config/emulationstation/es_input.cfg
|
|
cp -f /usr/config/emulationstation/es_input.cfg /storage/.config/emulationstation/es_input.cfg
|
|
fi
|