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