Fix up userconfig setup.

This commit is contained in:
fewtarius 2022-02-28 16:36:40 -05:00
parent 54d8cb1bd9
commit 6628c5c19c
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -3,10 +3,21 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
. /etc/os-release
# Remove those sample files that we manage
for sample in $(find /storage/.config -name '*.sample' 2>/dev/null); do
[ -f /usr/config/${sample:17} ] && rm -f ${sample}
[ -f /usr/config/${sample:16} ] && rm -f ${sample}
done
# Copy config files, but don't overwrite - this should replace our sample files
false | cp -iRp /usr/config/* /storage/.config/ &>/dev/null
if [ ! -e "/storage/.configured" ]
then
# Copy config files, but don't overwrite. Only run if /storage is fresh
## cp -iRp /usr/config/* /storage/.config/ &>/dev/null
## ignore es_systems.cfg and switch to rsync
rsync -a --ignore-existing --exclude=es_systems.cfg /usr/config/* /storage/.config/
if [ "${HW_DEVICE}" == "RG552" ]; then
cp -f /usr/config/splash/splash-1152.png /storage/.config/emulationstation/resources/logo.png
fi
touch /storage/.configured
fi