From b22e84887e433f7ef41c5a7dd5c5b1fc67a58810 Mon Sep 17 00:00:00 2001 From: the Sane <3657071+the-sane@users.noreply.github.com> Date: Sun, 31 Jan 2021 11:33:31 -0500 Subject: [PATCH] Improve argument handling --- lug-helper.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 33c6a3d..926f7dd 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -1256,9 +1256,9 @@ Usage: lug-helper # and this setting has no effect if [ -x "$(command -v zenity)" ]; then use_zenity="$(echo "$1" | cut -d'=' -f2)" - if [ "$use_zenity" = "yes" ] || [ "$use_zenity" = "YES" ]; then + if [ "$use_zenity" = "yes" ] || [ "$use_zenity" = "YES" ] || [ "$use_zenity" = "1" ]; then use_zenity=1 - elif [ "$use_zenity" = "no" ] || [ "$use_zenity" = "NO" ]; then + elif [ "$use_zenity" = "no" ] || [ "$use_zenity" = "NO" ] || [ "$use_zenity" = "0" ]; then use_zenity=0 else printf "$0: Invalid option '$1'\n" @@ -1286,7 +1286,6 @@ Usage: lug-helper for (( i=0; i<"${#cargs[@]}"; i++ )); do ${cargs[i]} done - exit 0 fi fi