From c1c0491a66e664cb850aa4a997809617b8ecc4e9 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 19 Apr 2024 11:48:36 +0900 Subject: [PATCH] ES-DE: migrating collections and games list in a new structure --- functions/post_update.sh | 8 ++++++++ functions/prepare_component.sh | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/functions/post_update.sh b/functions/post_update.sh index b3030442..fb7120e2 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -300,6 +300,14 @@ post_update() { fi + if [[ $(check_version_is_older_than "0.8.1b") == "true" ]]; then + log d "ES-DE files were moved inside the retrodeck folder, migrating to the new structure" + dir_prep "$rdhome/ES-DE/collections" "/var/config/ES-DE/collections" + dir_prep "$rdhome/ES-DE/gamelists" "/var/config/ES-DE/gamelists" + mv -f "$rdhome/gamelists/"* "$rdhome/ES-DE/gamelists" + rm -rf "$rdhome/gamelists" + fi + # if [[ $(check_version_is_older_than "0.9.0b") == "true" ]]; then # # Placeholder for version 0.9.0b # rm /var/config/emulationstation/.emulationstation # remving the old symlink to .emulationstation as it might be not needed anymore diff --git a/functions/prepare_component.sh b/functions/prepare_component.sh index da229d6b..26b8c483 100644 --- a/functions/prepare_component.sh +++ b/functions/prepare_component.sh @@ -60,7 +60,8 @@ prepare_component() { 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" + dir_prep "$rdhome/ES-DE/gamelists" "/var/config/ES-DE/gamelists" + dir_prep "$rdhome/ES-DE/collections" "/var/config/ES-DE/collections" dir_prep "$rd_logs_folder/ES-DE" "$es_source_logs" log d "Generating roms system folders" #es-de --home /var/config/ES-DE --create-system-dirs