mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2025-02-16 11:25:39 +00:00
Another updater fix
Fix update file cleanup
This commit is contained in:
parent
57f5f9ab20
commit
6763286b77
|
@ -325,6 +325,9 @@ set_setting_value() {
|
|||
else
|
||||
sed -i '\^\['"$current_section_name"'\]^,\^\^'"$setting_name_to_change"'.*^s^\^'"$setting_name_to_change"'=.*^'"$setting_name_to_change"'='"$setting_value_to_change"'^' $1
|
||||
fi
|
||||
if [[ "$4" == "retrodeck" ]]; then # If a RetroDECK setting is being changed, also write it to memory for immediate use
|
||||
eval "$setting_name_to_change=$setting_value_to_change"
|
||||
fi
|
||||
;;
|
||||
|
||||
"retroarch" )
|
||||
|
@ -758,7 +761,7 @@ check_for_version_update() {
|
|||
mkdir -p "$rdhome/RetroDECK_Updates"
|
||||
wget -P "$rdhome/RetroDECK_Updates" $latest_cooker_download
|
||||
flatpak-spawn --host flatpak install --user --bundle --noninteractive -y "$rdhome/RetroDECK_Updates/RetroDECK.flatpak"
|
||||
rm -f "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space
|
||||
rm -rf "$rdhome/RetroDECK_Updates" # Cleanup old bundles to save space
|
||||
) |
|
||||
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
|
|
|
@ -126,7 +126,7 @@ if [[ ! -f "$rd_conf" ]]; then
|
|||
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
||||
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
|
||||
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
|
||||
update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/RetroDECK-cooker/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
set_setting_value $rd_conf "update_ignore" "$update_ignore" retrodeck "options" # Store the latest online version to ignore for future checks, as internal version and online tag version may not match up.
|
||||
fi
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 717b78093797270877ec416e58082f1c71d435d8
|
||||
Subproject commit 0b1cfb79e591e10488a3262d6b38db843c39a409
|
|
@ -106,7 +106,7 @@ then
|
|||
echo "Config file's version is $version but the actual version is $hard_version"
|
||||
if grep -qF "cooker" <<< $hard_version; then # If newly-installed version is a "cooker" build
|
||||
cooker_base_version=$(echo $hard_version | cut -d'-' -f2)
|
||||
update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/RetroDECK-cooker/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
update_ignore=$(curl --silent "https://api.github.com/repos/XargonWan/$update_repo/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
set_setting_value $rd_conf "update_ignore" "$update_ignore" retrodeck "options" # Store the latest online version to ignore for future checks, as internal version and online tag version may not match up.
|
||||
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Upgrade" --extra-button="Don't Upgrade" --extra-button="Fresh Install" \
|
||||
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
|
||||
|
|
Loading…
Reference in a new issue