Improve cooker upgrade flow

This commit is contained in:
icenine451 2023-04-18 11:26:35 -04:00
parent 0c2f8de072
commit ca7f5ea133

View file

@ -106,6 +106,8 @@ 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
set_setting_value $rd_conf "update_repo" "RetroDECK-cooker" retrodeck "options"
set_setting_value $rd_conf "update_check" "true" retrodeck "options"
cooker_base_version=$(echo $hard_version | cut -d'-' -f2 | sed 's/\([0-9]\.[0-9][a-z]\).*/\1/')
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" \
@ -128,6 +130,10 @@ then
post_update
fi
else # If newly-installed version is a normal build.
grep -qF "cooker" <<< $version; then # If previously installed version was a cooker build
set_setting_value $rd_conf "update_repo" "RetroDECK" retrodeck "options"
set_setting_value $rd_conf "update_check" "false" retrodeck "options"
fi
post_update # Executing post update script
fi
fi