changed 'identifier' to 'label' to avoid confusion with app bundle identifier

This commit is contained in:
Armin Briegel
2020-05-04 16:36:15 +02:00
parent c88cb0421c
commit 2fd7fede8c
2 changed files with 11 additions and 11 deletions

View File

@@ -30,8 +30,8 @@ BLOCKING_PROCESS_ACTION=prompt_user
# Each workflow identifier needs to be listed in the case statement below.
# for each identifier these variables can be set:
# Each workflow label needs to be listed in the case statement below.
# for each label these variables can be set:
#
# - name: (required)
# Name of the installed app.
@@ -135,29 +135,29 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name
# use the _last_ argument for the identifier
# use the _last_ argument for the label
# this allows to use the command from the CLI as well as a jamf policy script
if [[ $# -eq 0 ]]; then
echo "no identifier provided"
echo "no label provided"
exit 1
elif [[ $# -gt 1 ]]; then
shift $(( $# - 1 ))
fi
identifier=${1:?"no identifier provided"}
label=${1:?"no label provided"}
# lowercase the identifier
identifier=${identifier:l}
# lowercase the label
label=${label:l}
# get current user
currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print $3 }')
# identifiers in case statement
# labels in case statement
case $identifier in
case $label in
version)
# print the script version
echo "Installomater: version $VERSION"
@@ -629,8 +629,8 @@ case $identifier in
expectedTeamID="broken"
;;
*)
# unknown identifier
echo "unknown identifier $identifier"
# unknown label
echo "unknown label $label"
exit 1
;;
esac