mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-29 00:55:42 +00:00
LOGGER: enhanced logging in dir_prep, update_splashscreens, set_setting_value, prepare_components: es-de
This commit is contained in:
parent
f321ad5f29
commit
94a730029b
|
@ -239,19 +239,19 @@ dir_prep() {
|
|||
real="$1"
|
||||
symlink="$2"
|
||||
|
||||
log d "[DIR PREP]\nMoving $symlink in $real" #DEBUG
|
||||
log d "Preparing directory $symlink in $real"
|
||||
|
||||
# if the symlink dir is already a symlink, unlink it first, to prevent recursion
|
||||
if [ -L "$symlink" ];
|
||||
then
|
||||
log d "$symlink is already a symlink, unlinking to prevent recursives" #DEBUG
|
||||
log d "$symlink is already a symlink, unlinking to prevent recursives"
|
||||
unlink "$symlink"
|
||||
fi
|
||||
|
||||
# if the dest dir exists we want to backup it
|
||||
if [ -d "$symlink" ];
|
||||
then
|
||||
log d "$symlink found" #DEBUG
|
||||
log d "$symlink found"
|
||||
mv -f "$symlink" "$symlink.old"
|
||||
fi
|
||||
|
||||
|
@ -574,6 +574,8 @@ update_splashscreens() {
|
|||
# This script will purge any existing ES graphics and reload them from RO space into somewhere ES will look for it
|
||||
# USAGE: update_splashscreens
|
||||
|
||||
log i "Updating splash screen"
|
||||
|
||||
rm -rf /var/config/ES-DE/resources/graphics
|
||||
rsync -rlD --mkpath "/app/retrodeck/graphics/" "/var/config/ES-DE/resources/graphics/"
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ set_setting_value() {
|
|||
local setting_value_to_change=$(sed -e 's^\\^\\\\^g;s^`^\\`^g' <<< "$3")
|
||||
local current_section_name=$(sed -e 's/%/\\%/g' <<< "$5")
|
||||
|
||||
log d "Setting $setting_name_to_change=$setting_value_to_change"
|
||||
|
||||
case $4 in
|
||||
|
||||
"retrodeck" | "citra" | "melonds" | "yuzu" )
|
||||
|
|
|
@ -41,14 +41,18 @@ prepare_component() {
|
|||
fi
|
||||
|
||||
if [[ "$component" =~ ^(es-de|ES-DE|all)$ ]]; then # For use after ESDE-related folders are moved or a reset
|
||||
log d "Preparing component: ES-DE"
|
||||
if [[ "$action" == "reset" ]]; then
|
||||
log d "Reset action si triggered for: ES-DE"
|
||||
rm -rf /var/config/ES-DE
|
||||
create_dir /var/config/ES-DE/settings
|
||||
log d "Initializing es_settings.xml"
|
||||
cp -f /app/retrodeck/es_settings.xml /var/config/ES-DE/settings/es_settings.xml
|
||||
set_setting_value "$es_settings" "ROMDirectory" "$roms_folder" "es_settings"
|
||||
set_setting_value "$es_settings" "MediaDirectory" "$media_folder" "es_settings"
|
||||
set_setting_value "$es_settings" "UserThemeDirectory" "$themes_folder" "es_settings"
|
||||
dir_prep "$rdhome/gamelists" "/var/config/ES-DE/gamelists"
|
||||
log d "Generating roms system folders"
|
||||
es-de --home /var/config/ES-DE --create-system-dirs
|
||||
update_splashscreens
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue