From b615b35f84e4f9a896787279036cc5241d90a934 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Sat, 4 May 2024 01:27:14 -0700 Subject: [PATCH] added Uninstall command lines for plugin --- NonSteamLaunchers.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/NonSteamLaunchers.sh b/NonSteamLaunchers.sh index 0e6e0e1..f968657 100755 --- a/NonSteamLaunchers.sh +++ b/NonSteamLaunchers.sh @@ -546,7 +546,7 @@ if [[ $options == "Start Fresh" ]] || [[ $selected_launchers == "Start Fresh" ]] fi fi -if [[ $options == "Uninstall" ]]; then +if [[ ${#args[@]} -eq 0 ]]; then # Check if the cancel button was clicked # The OK button was not clicked # Define the launcher options @@ -570,6 +570,17 @@ if [[ $options == "Uninstall" ]]; then FALSE "Minecraft"\ FALSE "Playstation Plus"\ FALSE "VK Play") + else + # Arguments were passed, use them as options + options="${args[@]}" # The args are the selected options + fi + + # Check if the options contain "Uninstall" + if [[ $options == *"Uninstall"* ]]; then + # Remove "Uninstall" from the options + options=${options//Uninstall/} + fi + if [[ $options != "" ]]; then # The Uninstall button was clicked