From ace0aa59ea26debea7476e8c9ca150df50d0c447 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Mon, 22 Jul 2024 09:43:15 -0400 Subject: [PATCH] More 0.8.3b ES-DE recovery --- functions/post_update.sh | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/functions/post_update.sh b/functions/post_update.sh index ca482359..2d7f8532 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -345,6 +345,7 @@ post_update() { move "$rdhome/themes" "$rdhome/ES-DE/themes" && log d "Move of \"$rdhome/themes\" completed" move "$rdhome/downloaded_media" "$rdhome/ES-DE/downloaded_media" && log d "Move of \"$rdhome/downloaded_media\" completed" move "$rdhome/gamelists" "$rdhome/ES-DE/gamelists" && log d "Move of \"$rdhome/gamelists/\" completed" + move "$rdhome/collections" "$rdhome/ES-DE/collections" && log d "Move of \"$rdhome/collections/\" completed" log i "Since in this version we moved to a PR build of Ryujinx we need to symlink it." ln -sv $ryujinxconf "$(dirname $ryujinxconf)/PRConfig.json" fi @@ -352,24 +353,24 @@ post_update() { if [[ $(check_version_is_older_than "0.8.3b") == "true" ]]; then # In version 0.8.3b, the following changes were made: # - Recovery from a failed move of the themes, downloaded_media and gamelists folder to their new ES-DE locations. - if [[ !-d "$rdhome/ES-DE/themes" || ! -d "$rdhome/ES-DE/downloaded_media" || ! -d "$rdhome/ES-DE/gamelists" || ! -d "$rdhome/ES-DE/collections" ]]; then + if [ ! -d "$rdhome/ES-DE/themes" ] || [ ! -d "$rdhome/ES-DE/downloaded_media" ] || [ ! -d "$rdhome/ES-DE/gamelists" ] || [ ! -d "$rdhome/ES-DE/collections" ]; then log i "Moving ES-DE downloaded_media, gamelist, and themes from \"$rdhome\" to \"$rdhome/ES-DE\" due to a RetroDECK Framework bug" - if [[ -d "$rdhome/themes" && ! -d "$rdhome/ES-DE/themes" ]]; then + if [[ -d "$rdhome/themes" ]]; then move "$rdhome/themes" "$rdhome/ES-DE/themes" && log d "Move of \"$rdhome/themes\" completed" else log i "ES-DE themes appears to already have been migrated." fi - if [[ -d "$rdhome/downloaded_media" && ! -d "$rdhome/ES-DE/downloaded_media" ]]; then + if [[ -d "$rdhome/downloaded_media" ]]; then move "$rdhome/downloaded_media" "$rdhome/ES-DE/downloaded_media" && log d "Move of \"$rdhome/downloaded_media\" completed" else log i "ES-DE downloaded media appears to already have been migrated." fi - if [[ -d "$rdhome/gamelists" && ! -d "$rdhome/ES-DE/gamelists" ]]; then + if [[ -d "$rdhome/gamelists" ]]; then move "$rdhome/gamelists" "$rdhome/ES-DE/gamelists" && log d "Move of \"$rdhome/gamelists/\" completed" else log i "ES-DE gamelists appears to already have been migrated." fi - if [[ -d "$rdhome/collections" && ! -d "$rdhome/ES-DE/collections" ]]; then + if [[ -d "$rdhome/collections" ]]; then move "$rdhome/collections" "$rdhome/ES-DE/collections" && log d "Move of \"$rdhome/collections/\" completed" else log i "ES-DE collections appears to already have been migrated." @@ -379,31 +380,6 @@ post_update() { fi fi - if [[ $(check_version_is_older_than "0.8.3b") == "true" ]]; then - # In version 0.8.3b, the following changes were made: - # - Recovery from a failed move of the themes, downloaded_media and gamelists folder to their new ES-DE locations. - if [[ !-d "$rdhome/ES-DE/themes" || ! -d "$rdhome/ES-DE/downloaded_media" || ! -d "$rdhome/ES-DE/gamelists" ]]; then - log i "Moving ES-DE downloaded_media, gamelist, and themes from \"$rdhome\" to \"$rdhome/ES-DE\" due to a RetroDECK Framework bug" - if [[ -d "$rdhome/themes" && ! -d "$rdhome/ES-DE/themes" ]]; then - move "$rdhome/themes" "$rdhome/ES-DE/themes" && log d "Move of \"$rdhome/themes\" completed" - else - log i "ES-DE themes appears to already have been migrated." - fi - if [[ -d "$rdhome/downloaded_media" && ! -d "$rdhome/ES-DE/downloaded_media" ]]; then - move "$rdhome/downloaded_media" "$rdhome/ES-DE/downloaded_media" && log d "Move of \"$rdhome/downloaded_media\" completed" - else - log i "ES-DE downloaded media appears to already have been migrated." - fi - if [[ -d "$rdhome/gamelists" && ! -d "$rdhome/ES-DE/gamelists" ]]; then - move "$rdhome/gamelists" "$rdhome/ES-DE/gamelists" && log d "Move of \"$rdhome/gamelists/\" completed" - else - log i "ES-DE gamelists appears to already have been migrated." - fi - else - log i "ES-DE dfolders appears to already have been migrated." - fi - 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