From 7bf47ff9e5a391e6e80e85962ad6e835c57d1e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 19 Aug 2022 11:10:04 +0200 Subject: [PATCH 1/3] Dialog update when app is already at the latest version Not sure I use the correct values in the `updateDialog` call, but it works fine. --- fragments/main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fragments/main.sh b/fragments/main.sh index 4cf42fb..94e67e0 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -155,6 +155,10 @@ if [[ -n $appNewVersion ]]; then printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "complete" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No newer version." REQ fi else From dcfd7d8328b56524084d81617dd085cd685128f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 19 Aug 2022 11:19:12 +0200 Subject: [PATCH 2/3] More Dialog messages --- fragments/functions.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fragments/functions.sh b/fragments/functions.sh index a14c406..ccf39c8 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -282,6 +282,10 @@ getAppVersion() { printlog "Replacing App Store apps, no matter the version" WARN appversion=0 else + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Already installed from App Store. Not replaced." + sleep 4 + fi cleanupAndExit 23 "App previously installed from App Store, and we respect that" ERROR fi fi @@ -459,6 +463,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No new version to install" REG else printlog "Using force to install anyway." @@ -625,6 +633,10 @@ installFromPKG() { printlog "notifying" displaynotification "$message" "No update for $name!" fi + if [[ $DIALOG_CMD_FILE != "" ]]; then + updateDialog "wait" "Latest version already installed..." + sleep 2 + fi cleanupAndExit 0 "No new version to install" REQ else printlog "Using force to install anyway." From a8ba97b87e2ccb5700dcc2449d8d4cbd43d25fa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 19 Aug 2022 15:08:42 +0200 Subject: [PATCH 3/3] One `$` too many --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index ccf39c8..951669b 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -997,7 +997,7 @@ updateDialog() { fi # when to cmdfile is set, do nothing - if [[ $$cmd_file == "" ]]; then + if [[ $cmd_file == "" ]]; then return fi