distribution/packages/jelos/sources/post-update

42 lines
2 KiB
Text
Raw Normal View History

#!/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/ &
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)
### 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
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
rsync --ignore-existing /usr/config/rsync-rules.conf /storage/.config/
rsync --ignore-existing /usr/config/rsync.conf /storage/.config/
### 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
### Start the time service by default
set_setting wts.enabled 1