From 49050919082e8fdfd6f11ae640f032cb38570623 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 1 Aug 2022 08:39:03 +0200 Subject: [PATCH] list item update working with swiftdialog Alpha 1.12.0.3169 --- MDM/swiftdialog_example.sh | 6 +++--- fragments/functions.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/MDM/swiftdialog_example.sh b/MDM/swiftdialog_example.sh index 7b2174e..2b72406 100755 --- a/MDM/swiftdialog_example.sh +++ b/MDM/swiftdialog_example.sh @@ -24,7 +24,7 @@ fakeInstallDelay=5 items=( "firefoxpkg|Firefox" "googlechromepkg|Google Chrome" - "microsoftoffice365|Microsoft Office 365" + "microsoftedge|Microsoft Edge" ) # MARK: Constants @@ -97,7 +97,7 @@ installomator() { startItem $description $installomator $label \ - DIALOG_PROGRESS=main \ + DIALOG_PROGRESS="list" \ DIALOG_CMD_FILE=$dialog_command_file \ DEBUG=$DEBUG @@ -186,7 +186,7 @@ checkInstallomator() { fi else # update installomator - installomator installomator + # installomator installomator fi } diff --git a/fragments/functions.sh b/fragments/functions.sh index cac412f..27c2214 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -916,8 +916,12 @@ readDownloadPipe() { fi if [[ $char == % ]]; then - updateDialogProgressText "Downloading $name - $progress%" - updateDialogProgress "$progress" + if [[ $DIALOG_PROGRESS == "main" ]]; then + updateDialogProgressText "Downloading $name - $progress%" + updateDialogProgress "$progress" + elif [[ $DIALOG_PROGRESS == "list" ]]; then + echo "listitem: title: $name, statustext: Downloading... $progress%, progress: $progress" >> $log + fi progress="" keep=0 fi