distribution/packages/jelos/sources/post-update

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