From 1371676da9b7debaa2f7cd5bb37d9308d77ecd84 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 29 Mar 2024 15:59:01 -0400 Subject: [PATCH] Update dir_prep to strip trailing slashes Fix RPCS3 savedata relocate post_update action --- functions/functions.sh | 4 ++-- functions/post_update.sh | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/functions/functions.sh b/functions/functions.sh index b19dcd38..c7641735 100644 --- a/functions/functions.sh +++ b/functions/functions.sh @@ -236,8 +236,8 @@ dir_prep() { # Call me with: # dir prep "real dir" "symlink location" - real="$1" - symlink="$2" + real="$(realpath -s $1)" + symlink="$(realpath -s $2)" log d "Preparing directory $symlink in $real" diff --git a/functions/post_update.sh b/functions/post_update.sh index 20b75d62..50108eae 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -283,14 +283,11 @@ post_update() { # The save folder of rpcs3 was inverted so we're moving the saves into the real one log i "RPCS3 saves needs to be migrated, executing." - mv "$saves_folder/ps3/rpcs3" "$saves_folder/ps3/rpcs3.bak" - mkdir -p "$saves_folder/ps3/rpcs3" - mv -v "$saves_folder/ps3/rpcs3.bak"/* "$saves_folder/ps3/rpcs3" - mv -v "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata"/* "$saves_folder/ps3/rpcs3" - mv -v "$saves_folder/ps3/rpcs3.bak" "$rdhome/backups/saves/ps3/rpcs3" - log i "RPCS3 saves migration completed, a backup was made here: \"$rdhome/backups/saves/ps3/rpcs3\"." - source /app/libexec/functions.sh + create_dir "$backups_folder" + zip -rq9 "$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip" "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" dir_prep "$saves_folder/ps3/rpcs3" "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" + log i "RPCS3 saves migration completed, a backup was made here: \"$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip\"." + log i "Switch firmware folder should be moved in \"$bios_folder/switch/firmware\" from \"$bios_folder/switch/registered\"" mv "$bios_folder/switch/registered" "$bios_folder/switch/firmware"