Confirmation messages added when a task has been completed, e.g. install, upgrade, remove.
This commit is contained in:
@ -638,6 +638,8 @@ game_installer() {
|
||||
if [[ -f "$installScript" ]]; then
|
||||
# Source and execute the install script
|
||||
source "$installScript"
|
||||
# Show success message
|
||||
ui_msgbox "Game Installer" "Game Installer" "${game} has been installed."
|
||||
else
|
||||
ui_msgbox "Game Installer" "Game Installer" "Installation script not found for ${game}"
|
||||
exit 1
|
||||
@ -692,6 +694,8 @@ game_removal() {
|
||||
# Remove only the .sh symlink
|
||||
rm -fv "${0%/*}/.launch/${gameName}.sh" | \
|
||||
ui_progressbox "Linux Game Manager" "Removing game from list..."
|
||||
# Show success message
|
||||
ui_msgbox "Linux Game Manager" "Linux Game Manager" "${gameName} has been removed from the list."
|
||||
else
|
||||
# Found install path, can remove game files
|
||||
ui_yesno "Linux Game Manager" "Linux Game Manager" "This will remove the directory \"${gameInstallPath}\" and all of its contents. Do you want to continue?" || exit 0
|
||||
@ -699,6 +703,8 @@ game_removal() {
|
||||
{ rm -rfv "${gameInstallPath}"
|
||||
rm -fv "${0%/*}/.launch/${gameName}.sh";
|
||||
} | ui_progressbox "Linux Game Manager" "Removing game..."
|
||||
# Show success message
|
||||
ui_msgbox "Linux Game Manager" "Linux Game Manager" "${gameName} has been removed."
|
||||
fi
|
||||
exit 0
|
||||
}
|
||||
@ -728,11 +734,16 @@ game_update() {
|
||||
open_url "https://2mb.games/product/2mb-patron/"
|
||||
exit 0
|
||||
fi
|
||||
# Get the game name for success message
|
||||
local updateGameName="${game##*/}"
|
||||
updateGameName="${updateGameName%.sh}"
|
||||
source "${game}"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
run_update
|
||||
# Show success message
|
||||
ui_msgbox "Audio Game Updater" "Audio Game Updater" "${updateGameName} has been updated."
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user