changed parameter detection for jamf, added iTerm2

This commit is contained in:
Armin Briegel
2020-05-08 11:33:21 +02:00
parent 9dd5fc2df1
commit 8d8b7661e5

View File

@@ -9,7 +9,7 @@
# with additional ideas and contribution from Isaac Ordonez, Mann consulting # with additional ideas and contribution from Isaac Ordonez, Mann consulting
VERSION='0.1' VERSION='0.1'
VERSIONDATE='20200506' VERSIONDATE='20200508'
export PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH=/usr/bin:/bin:/usr/sbin:/sbin
@@ -134,16 +134,14 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name
fi fi
} }
# get the label
# 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 if [[ $# -eq 0 ]]; then
echo "no label provided" echo "no label provided"
exit 1 exit 1
elif [[ $# -gt 1 ]]; then elif [[ $# -gt 3 ]]; then
shift $(( $# - 1 )) # jamf uses $4 for the first custom parameter
echo "shifting arguments for Jamf"
shift 3
fi fi
label=${1:?"no label provided"} label=${1:?"no label provided"}
@@ -169,7 +167,7 @@ case $label in
exit 0 exit 0
;; ;;
# app descriptions start here # label descriptions start here
googlechrome) googlechrome)
name="Google Chrome" name="Google Chrome"
type="dmg" type="dmg"
@@ -457,6 +455,12 @@ case $label in
downloadURL="https://download.teamviewer.com/download/TeamViewer.dmg" downloadURL="https://download.teamviewer.com/download/TeamViewer.dmg"
expectedTeamID="H7UGFBUGV6" expectedTeamID="H7UGFBUGV6"
;; ;;
iterm2)
name="iTerm"
type="zip"
downloadURL="https://iterm2.com/downloads/stable/latest"
expectedTeamID="H7V7XYVQ7D"
;;
# Note: Packages is signed but _not_ notarized, so spctl will reject it # Note: Packages is signed but _not_ notarized, so spctl will reject it