added Uninstall command lines for plugin

This commit is contained in:
Roy 2024-05-04 01:27:14 -07:00 committed by GitHub
parent aeebd08f45
commit b615b35f84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -546,7 +546,7 @@ if [[ $options == "Start Fresh" ]] || [[ $selected_launchers == "Start Fresh" ]]
fi fi
fi fi
if [[ $options == "Uninstall" ]]; then if [[ ${#args[@]} -eq 0 ]]; then
# Check if the cancel button was clicked # Check if the cancel button was clicked
# The OK button was not clicked # The OK button was not clicked
# Define the launcher options # Define the launcher options
@ -570,6 +570,17 @@ if [[ $options == "Uninstall" ]]; then
FALSE "Minecraft"\ FALSE "Minecraft"\
FALSE "Playstation Plus"\ FALSE "Playstation Plus"\
FALSE "VK Play") 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 if [[ $options != "" ]]; then
# The Uninstall button was clicked # The Uninstall button was clicked