2022-03-16 22:03:28 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
|
|
|
|
. /etc/profile
|
|
|
|
|
2022-03-28 23:53:26 +00:00
|
|
|
### 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/ &
|
2022-04-03 17:01:59 +00:00
|
|
|
rsync -a --ignore-existing /usr/config/game /storage/.config/ &
|
2022-03-28 23:53:26 +00:00
|
|
|
rsync -a /usr/config/modules /storage/.config/ &
|
|
|
|
|
|
|
|
wait < <(jobs -p)
|
2022-03-16 22:03:28 +00:00
|
|
|
|
|
|
|
### Always update these after an upgrade incase there are necessary changes
|
|
|
|
cp -f /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt
|
|
|
|
cp -f /usr/config/emulationstation/es_input.cfg /storage/.config/emulationstation
|
|
|
|
cp -f /usr/config/emulationstation/es_features.cfg /storage/.config/emulationstation
|
2022-04-15 15:27:06 +00:00
|
|
|
cp -f /usr/config/emulationstation/es_systems.cfg /storage/.config/emulationstation
|
2022-04-09 13:26:40 +00:00
|
|
|
cp -f /usr/config/modules/gamelist.xml /storage/.config/modules
|
2022-04-26 16:51:27 +00:00
|
|
|
cp -f /usr/config/retroarch/retroarch-core-options.cfg /storage/.config/retroarch/retroarch-core-options.cfg
|
2022-03-16 22:03:28 +00:00
|
|
|
|
2022-04-03 17:01:59 +00:00
|
|
|
rsync --ignore-existing /usr/config/rsync-rules.conf /storage/.config/
|
|
|
|
rsync --ignore-existing /usr/config/rsync.conf /storage/.config/
|
|
|
|
|
2022-04-20 20:33:47 +00:00
|
|
|
### Shift away from using overlayfs so we don't have to constantly sync the directories.
|
|
|
|
sed -i "s#/tmp/overlays#/usr/share/retroarch-overlays#g" /storage/.config/retroarch/retroarch.cfg
|
|
|
|
sed -i "s#/tmp/shaders#/usr/share/common-shaders#g" /storage/.config/retroarch/retroarch.cfg
|
|
|
|
sed -i "s#/tmp/joypads#/etc/retroarch-joypad-autoconfig#g" /storage/.config/retroarch/retroarch.cfg
|
|
|
|
sed -i "s#/tmp/database#/usr/share/libretro-database#g" /storage/.config/retroarch/retroarch.cfg
|
|
|
|
sed -i "s#/tmp/assets#/usr/share/retroarch-assets#g" /storage/.config/retroarch/retroarch.cfg
|
|
|
|
sed -i "s#/tmp/cores#/usr/lib/libretro#g" /storage/.config/retroarch/retroarch.cfg
|
|
|
|
|
2022-03-28 22:00:26 +00:00
|
|
|
### Start the time service by default
|
|
|
|
set_setting wts.enabled 1
|