From e1ad0c01322cc0a96b25bc71b3222209ca5a2de2 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Wed, 10 Aug 2022 14:54:51 +0200 Subject: [PATCH] fixed logic error and added `--mini` window for dialog --- MDM/swiftdialog_example.sh | 6 ++---- fragments/arguments.sh | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/MDM/swiftdialog_example.sh b/MDM/swiftdialog_example.sh index 72af118..ee48ef3 100755 --- a/MDM/swiftdialog_example.sh +++ b/MDM/swiftdialog_example.sh @@ -124,13 +124,11 @@ caffeinate -dimsu & caffeinatePID=$! trap cleanupAndExit EXIT # display first screen -$dialog --title none \ +$dialog --title "Installing $label" \ --message "" \ --hideicon \ + --mini \ --progress 100 \ - --button1disabled \ - --height 40 \ - --width 500 \ --position bottomright \ --ontop \ --movable \ diff --git a/fragments/arguments.sh b/fragments/arguments.sh index c993777..29d81a5 100644 --- a/fragments/arguments.sh +++ b/fragments/arguments.sh @@ -25,7 +25,7 @@ fi while [[ -n $1 ]]; do if [[ $1 =~ ".*\=.*" ]]; then # if an argument contains an = character, send it to eval - printlog "setting variable from argument $1" WARN + printlog "setting variable from argument $1" INFO eval $1 else # assume it's a label @@ -104,8 +104,9 @@ fi # check Swift Dialog presence and version DIALOG_CMD="/usr/local/bin/dialog" -if [[ -x $DIALOG_CMD ]]; then +if [[ ! -x $DIALOG_CMD ]]; then # Swift Dialog is not installed, clear cmd file variable to ignore + printlog "SwiftDialog is not installed, clear cmd file var" DIALOG_CMD_FILE="" fi