From 2032e0babf1ccbc6b722f5905ca76bd7d033aa9f Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Sat, 4 May 2024 01:50:58 -0700 Subject: [PATCH] reverted uninstall --- NonSteamLaunchers.sh | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 6c68ec8..0e6e0e1 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -546,10 +546,9 @@ if [[ $options == "Start Fresh" ]] || [[ $selected_launchers == "Start Fresh" ]] fi fi -# Check if any arguments were passed -if [[ ${#args[@]} -eq 0 ]]; then - # No arguments were passed, use Zenity - action="Uninstall" +if [[ $options == "Uninstall" ]]; then +# Check if the cancel button was clicked + # The OK button was not clicked # Define the launcher options options=$(zenity --list --checklist \ --title="Uninstall Launchers" \ @@ -571,15 +570,8 @@ if [[ ${#args[@]} -eq 0 ]]; then FALSE "Minecraft"\ FALSE "Playstation Plus"\ FALSE "VK Play") - else - # Arguments were passed, use them as options - action="${args[0]}" - unset 'args[0]' # Remove the action from the args array - options="${args[@]}" # The remaining args are the selected options - fi - - if [[ $action == "Uninstall" ]]; then + if [[ $options != "" ]]; then # The Uninstall button was clicked # Add code here to handle the uninstallation of the selected launcher(s) if [[ $options == *"Epic Games"* ]]; then