51 lines
2.3 KiB
Bash
51 lines
2.3 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
|
|
rm -rf /storage/.config/modules/Drastic*
|
|
|
|
rsync --ignore-existing /usr/config/rsync-rules.conf /storage/.config/
|
|
rsync --ignore-existing /usr/config/rsync.conf /storage/.config/
|
|
|
|
### Shift away from using overlayfs for now until it's implemented better.
|
|
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
|
|
|
|
### Start the time service by default
|
|
set_setting wts.enabled 1
|
|
|
|
### Link the game controller database so it is managed with OS updates.
|
|
rm -f /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt
|
|
ln -s /usr/config/SDL-GameControllerDB/gamecontrollerdb.txt /storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt
|
|
|
|
### Remove and link es configs so they are managed with OS updates.
|
|
for es_cfg in es_features.cfg es_systems.cfg es_input.cfg
|
|
do
|
|
rm -f /storage/.config/emulationstation/${es_cfg}
|
|
ln -s /usr/config/emulationstation/${es_cfg} /storage/.config/emulationstation/${es_cfg}
|
|
done
|