Remove current container when updating cooker

Don't try to build presets before emulators have been set up on finit
This commit is contained in:
icenine451 2023-09-07 09:28:07 -04:00
parent e327762dde
commit 91f1fac361
2 changed files with 4 additions and 1 deletions

View file

@ -83,6 +83,7 @@ check_for_version_update() {
local latest_cooker_download=$(curl --silent https://api.github.com/repos/XargonWan/$update_repo/releases/latest | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')
mkdir -p "$rdhome/RetroDECK_Updates"
wget -P "$rdhome/RetroDECK_Updates" $latest_cooker_download
flatpak-spawn --host flatpak remove --noninteractive -y net.retrodeck.retrodeck # Remove current version before installing new one, to avoid duplicates
flatpak-spawn --host flatpak install --user --bundle --noninteractive -y "$rdhome/RetroDECK_Updates/RetroDECK-cooker.flatpak"
rm -rf "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space
) |

View file

@ -618,5 +618,7 @@ prepare_emulator() {
fi
# Update presets for all emulators after any reset or move
build_retrodeck_current_presets
if [[ ! "$emulator" == "retrodeck" ]]; then
build_retrodeck_current_presets
fi
}