From 92a4c4f3cb64d6b4e05664a5c2ed5650a318e79d Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Wed, 3 Aug 2022 10:46:47 +0200 Subject: [PATCH] fixed dialog check --- fragments/arguments.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/fragments/arguments.sh b/fragments/arguments.sh index ebe30bf..c993777 100644 --- a/fragments/arguments.sh +++ b/fragments/arguments.sh @@ -7,19 +7,6 @@ if ! is-at-least 10.14 $installedOSversion; then exit 98 fi -# check Swift Dialog presence and version -DIALOG_CMD="/usr/local/bin/dialog" - -if [[ -x $DIALOG_CMD ]]; then - # Swift Dialog is not installed, clear cmd file variable to ignore - DIALOG_CMD_FILE="" -fi - -if ! is-at-least 1.11.2 "$(/usr/local/bindialog --version)"; then - # list item progress is only available with SD 1.11.2 and higher - DIALOG_LIST_ITEM_NAME="" -fi - # MARK: argument parsing if [[ $# -eq 0 ]]; then @@ -113,6 +100,15 @@ if [[ "$(whoami)" != "root" && "$DEBUG" -eq 0 ]]; then cleanupAndExit 6 "not running as root, exiting" ERROR fi + +# check Swift Dialog presence and version +DIALOG_CMD="/usr/local/bin/dialog" + +if [[ -x $DIALOG_CMD ]]; then + # Swift Dialog is not installed, clear cmd file variable to ignore + DIALOG_CMD_FILE="" +fi + # MARK: labels in case statement case $label in longversion)