From 25af719e20a088b64a2aa1b9c3f0432cb24d6d2b Mon Sep 17 00:00:00 2001 From: XoMute Date: Sat, 16 Oct 2021 14:42:54 +0300 Subject: [PATCH 1/2] Added separate check for 'version' argument --- fragments/arguments.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fragments/arguments.sh b/fragments/arguments.sh index 4fca81e..6d32d97 100644 --- a/fragments/arguments.sh +++ b/fragments/arguments.sh @@ -36,6 +36,12 @@ done # lowercase the label label=${label:l} +# separate check for 'version' in order to print plain version number without any other information +if [ $label == "version" ]; then + echo "$VERSION" + exit 0 +fi + printlog "################## Start Installomator v. $VERSION" printlog "################## $label" From 918005477b5b1d3e81895398ee0c0c0fb1071620 Mon Sep 17 00:00:00 2001 From: XoMute Date: Sat, 16 Oct 2021 14:45:38 +0300 Subject: [PATCH 2/2] Removed 'version' check in case expression --- fragments/arguments.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fragments/arguments.sh b/fragments/arguments.sh index 6d32d97..0b7090f 100644 --- a/fragments/arguments.sh +++ b/fragments/arguments.sh @@ -55,11 +55,6 @@ currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print # MARK: labels in case statement case $label in -version) - # print the script VERSION - printlog "$VERSION" - exit 0 - ;; longversion) # print the script version printlog "Installomater: version $VERSION ($VERSIONDATE)"