distribution/packages/sysutils/systemd/scripts/userconfig-setup
fewtarius 1f6d96325b
* Fix ALSA on x86_64 handhelds.
* Temporary drop or correct multiple packages that needed updates for x86_64.
* Update volume service to deprecate hard coded paths.
* system-utils and sleep to common packages.
* Add weston kiosk.ini for future use.
* Add DIRTY variable, if true it will not clean.
2022-08-31 17:50:23 -04:00

53 lines
1.9 KiB
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
# Copyright (C) 2022-present Fewtarius
. /etc/profile
# Remove those sample files that we manage
for sample in $(find /storage/.config -name '*.sample' 2>/dev/null); do
[ -f /usr/config/${sample:16} ] && rm -f ${sample}
done
if [ ! -e "/storage/.configured" ]
then
# Ensure that the boot images are configured properly (Resolves boot when charging issue on the RG503 and RG353P
/usr/share/bootloader/update.sh &>/dev/null
rm -f /storage/.config/boot.hint &>/dev/null
# 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/
mkdir -p /storage/.config/emulationstation/themes
ln -s /usr/share/themes/es-theme-art-book-next /storage/.config/emulationstation/themes/system-theme
### 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
do
ln -s /usr/config/emulationstation/${es_cfg} /storage/.config/emulationstation/${es_cfg}
done
### Link the ES splash to the distribution splash
rm -f /storage/.config/emulationstation/resources/logo.png
ln -sf /usr/config/splash/splash.png /storage/.config/emulationstation/resources/logo.png
mkdir -p /storage/.config/modprobe.d
fi
if [ ! -e "/storage/.cache/ld.so.cache" ]
then
### Create library cache
ldconfig -X
fi
if [ ! -d "/storage/.config/emulationstation/locale/" ]
then
rsync -a --delete /usr/config/locale/ /storage/.config/emulationstation/locale/
fi