From 9e2221f943ce3444930fbe268f2131eedb076ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Thu, 9 Jul 2020 20:40:51 +0200 Subject: [PATCH] Dump the labels, if no label given Printing out the labels in the case statement if no label is given. (And a few extra lines from case-statements further down the script). --- Installomator.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installomator.sh b/Installomator.sh index a801f31..6b6213e 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -168,7 +168,9 @@ printlog "################## Start Installomator" # get the label if [[ $# -eq 0 ]]; then - printlog "no label provided" + printlog "no label provided. Printing labels:" + printlog "$(grep -E '^ *[a-z]*\*?\)$' "$0" | sed -E 's/^ *([a-z]+)[)]$/\1/g' )" + printlog "Omit the last lines from “*)”." exit 1 elif [[ $# -gt 3 ]]; then # jamf uses $4 for the first custom parameter