mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
changed 'identifier' to 'label' to avoid confusion with app bundle identifier
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user