Merge branch 'cooker' of https://github.com/XargonWan/RetroDECK into cooker

This commit is contained in:
icenine451 2025-04-03 14:13:38 -04:00
commit 21a567097a

View file

@ -13,15 +13,15 @@ post_update() {
# Optional userdata backup prior to update # Optional userdata backup prior to update
choice=$(rd_zenity --title "RetroDECK Update - Backup Userdata" --info --no-wrap --ok-label="No Backup" --extra-button="Backup Core Userdata" --extra-button="Backup Some Userdata" --extra-button="Backup All Userdata" \ choice=$(rd_zenity --title "RetroDECK Update - Backup Userdata" --info --no-wrap --ok-label="No Backup" --extra-button="Core Backup" --extra-button="Custom Backup" --extra-button="Complete Backup" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --text="Would you like to backup some or all of the RetroDECK userdata prior to update?\n\nIf you choose \"Backup Core Userdata\" only irreplaceable files (like saves, states and gamelists) will be backed up. If you choose \"Backup Some Userdata\" you will be given a choice of which folders to backup.\n\nIf you choose \"Backup All Userdata\" then ALL data (including ROMs and downloaded media) will be backed up.\nPLEASE NOTE: A full backup may take up a large amount of space, especially if you have a lot of scraped media.") --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" --text="Would you like to backup some or all of the RetroDECK userdata?\n\nChoose one of the following options:\n\n1. Core Backup: Only essential files (such as saves, states, and gamelists).\n\n2. Custom Backup: You will be given the option to select specific folders to backup.\n\n3. Complete Backup: All data, including games and downloaded media, will be backed up.\n\n<span foreground='$purple'><b>PLEASE NOTE: A complete backup may require a significant amount of space.</b></span>\n\n")
local rc=$? local rc=$?
if [[ $rc == "0" ]] && [[ -z "$choice" ]]; then # User selected No Backup button if [[ $rc == "0" ]] && [[ -z "$choice" ]]; then # User selected No Backup button
log i "User chose to not backup prior to update." log i "User chose to not backup prior to update."
else else
case $choice in case $choice in
"Backup Core Userdata" ) "Core Backup" )
log i "User chose to backup core userdata prior to update." log i "User chose to backup core userdata prior to update."
if ! backup_retrodeck_userdata "core"; then if ! backup_retrodeck_userdata "core"; then
log d "Userdata backup failed, giving option to proceed" log d "Userdata backup failed, giving option to proceed"
@ -31,7 +31,7 @@ post_update() {
fi fi
fi fi
;; ;;
"Backup Some Userdata" ) "Custom Backup" )
log i "User chose to backup some userdata prior to update." log i "User chose to backup some userdata prior to update."
while read -r config_line; do while read -r config_line; do
local current_setting_name=$(get_setting_name "$config_line" "retrodeck") local current_setting_name=$(get_setting_name "$config_line" "retrodeck")
@ -64,7 +64,7 @@ post_update() {
fi fi
fi fi
;; ;;
"Backup All Userdata" ) "Complete Backup" )
log i "User chose to backup all userdata prior to update." log i "User chose to backup all userdata prior to update."
if ! backup_retrodeck_userdata "complete"; then if ! backup_retrodeck_userdata "complete"; then
log d "Userdata backup failed, giving option to proceed" log d "Userdata backup failed, giving option to proceed"