Merge branch 'Installomator:main' into cricutdesignspace

This commit is contained in:
dnikles
2022-08-01 12:42:09 -04:00
committed by GitHub
25 changed files with 103 additions and 17 deletions

View File

@@ -81,6 +81,7 @@ LOGO=appstore
# - mosylem Mosyle Manager (Education)
# - addigy Addigy
# - microsoft Microsoft Endpoint Manager (Intune)
# - ws1 Workspace ONE (AirWatch)
# path can also be set in the command call, and if file exists, it will be used.
# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"'
# (spaces have to be escaped).
@@ -367,10 +368,13 @@ displaydialogContinue() { # $1: message $2: title
displaynotification() { # $1: message $2: title
message=${1:-"Message"}
title=${2:-"Notification"}
hubcli="/usr/local/bin/hubcli"
manageaction="/Library/Application Support/JAMF/bin/Management Action.app/Contents/MacOS/Management Action"
if [[ -x "$manageaction" ]]; then
"$manageaction" -message "$message" -title "$title"
elif [[ -x "$hubcli" ]]; then
"$hubcli" notify -t "$title" -i "$message" -c "Dismiss"
else
runAsUser osascript -e "display notification \"$message\" with title \"$title\""
fi
@@ -5264,6 +5268,11 @@ case $LOGO in
LOGO="/Library/Intune/Microsoft Intune Agent.app/Contents/Resources/AppIcon.icns"
if [[ -z $MDMProfileName ]]; then; MDMProfileName="Management Profile"; fi
;;
ws1)
# Workspace ONE
LOGO="/Applications/Workspace ONE Intelligent Hub.app/Contents/Resources/AppIcon.icns"
if [[ -z $MDMProfileName ]]; then; MDMProfileName="Device Manager"; fi
;;
esac
if [[ ! -a "${LOGO}" ]]; then
if [[ $(sw_vers -buildVersion) > "19" ]]; then

View File

@@ -199,6 +199,16 @@ xpath() {
fi
}
# from @Pico: https://macadmins.slack.com/archives/CGXNNJXJ9/p1652222365989229?thread_ts=1651786411.413349&cid=CGXNNJXJ9
getJSONValue() {
# $1: JSON string OR file path to parse (tested to work with up to 1GB string and 2GB file).
# $2: JSON key path to look up (using dot or bracket notation).
printf '%s' "$1" | /usr/bin/osascript -l 'JavaScript' \
-e "let json = $.NSString.alloc.initWithDataEncoding($.NSFileHandle.fileHandleWithStandardInput.readDataToEndOfFile$(/usr/bin/uname -r | /usr/bin/awk -F '.' '($1 > 18) { print "AndReturnError(ObjC.wrap())" }'), $.NSUTF8StringEncoding)" \
-e 'if ($.NSFileManager.defaultManager.fileExistsAtPath(json)) json = $.NSString.stringWithContentsOfFileEncodingError(json, $.NSUTF8StringEncoding, ObjC.wrap())' \
-e "const value = JSON.parse(json.js)$([ -n "${2%%[.[]*}" ] && echo '.')$2" \
-e 'if (typeof value === "object") { JSON.stringify(value, null, 4) } else { value }'
}
getAppVersion() {
# modified by: Søren Theilgaard (@theilgaard) and Isaac Ordonez

View File

@@ -2,10 +2,11 @@ adobecreativeclouddesktop)
name="Adobe Creative Cloud"
#appName="Install.app"
type="dmg"
adobeurl="https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html"
if [[ $(arch) == "arm64" ]]; then
downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*macarm64.*dmg" | cut -d '"' -f1 | head -1)
downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'osx10')][contains(text(),'Download')]/@href)" - 2> /dev/null)
elif [[ $(arch) == "i386" ]]; then
downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*osx10.*dmg" | cut -d '"' -f1 | head -1)
downloadURL=$(curl -fs "$adobeurl" | xmllint -html -xpath "string(//a[contains(@href,'macarm64')][contains(text(),'Download')]/@href)" - 2> /dev/null)
fi
#downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1)
appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2)

View File

@@ -1,7 +1,11 @@
blender)
name="blender"
type="dmg"
downloadURL=$(redirect=$(curl -sfL https://www.blender.org/download/ | sed 's/.*href="//' | sed 's/".*//' | grep .dmg) && curl -sfL "$redirect" | sed 's/.*href="//' | sed 's/".*//' | grep -m1 .dmg)
if [[ $(arch) == "arm64" ]]; then
downloadURL=$(curl -sfL "https://www.blender.org/download/" | xmllint --html --format - 2>/dev/null | grep -o "https://.*blender.*arm64.*.dmg" | sed '2p;d' | sed 's/www.blender.org\/download/download.blender.org/g')
elif [[ $(arch) == "i386" ]]; then
downloadURL=$(curl -sfL "https://www.blender.org/download/" | xmllint --html --format - 2>/dev/null | grep -o "https://.*blender.*x64.*.dmg" | sed '2p;d' | sed 's/www.blender.org\/download/download.blender.org/g')
fi
appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*/\1/g' )
expectedTeamID="68UA947AUU"
;;

View File

@@ -0,0 +1,12 @@
bluejeanswithaudiodriver)
name="BlueJeans"
type="pkg"
if [[ $(arch) == "arm64" ]]; then
downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeans.*Installer.*arm.*.pkg" )
elif [[ $(arch) == "i386" ]]; then
downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeansInstaller.*x86.*.dmg" | sed 's/dmg/pkg/g')
fi
appNewVersion=$(echo $downloadURL | cut -d '/' -f6)
choiceChangesXML='<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><array><dict><key>attributeSetting</key><integer>1</integer><key>choiceAttribute</key><string>selected</string><key>choiceIdentifier</key><string>com.tatvikmohit.BlueJeans-Audio</string></dict></array></plist>'
expectedTeamID="HE4P42JBGN"
;;

View File

@@ -1,7 +1,7 @@
clickshare)
# credit: Søren Theilgaard (@theilgaard)
name="ClickShare"
type="appInDmgInZip"
downloadURL=https://www.barco.com$(curl -fs "https://www.barco.com/en/clickshare/app" | grep -E -o '(\/\S*Download\?FileNumber=R3306192\S*ShowDownloadPage=False)' | tail -1)
downloadURL="https://www.barco.com$( curl -fs "https://www.barco.com/en/clickshare/app" | grep -A6 -i "macos" | grep -i "FileNumber" | tr '"' "\n" | grep -i "FileNumber" )"
appNewVersion="$(eval "$( echo $downloadURL | sed -E 's/.*(MajorVersion.*BuildVersion=[0-9]*).*/\1/' | sed 's/&amp//g' )" ; ((MajorVersion++)) ; ((MajorVersion--)); ((MinorVersion++)) ; ((MinorVersion--)); ((PatchVersion++)) ; ((PatchVersion--)); ((BuildVersion++)) ; ((BuildVersion--)); echo "${MajorVersion}.${MinorVersion}.${PatchVersion}-b${BuildVersion}")"
expectedTeamID="P6CDJZR997"
;;

View File

@@ -3,6 +3,7 @@ egnyte)
name="Egnyte Connect"
type="pkg"
downloadURL="https://egnyte-cdn.egnyte.com/egnytedrive/mac/en-us/latest/EgnyteConnectMac.pkg"
appNewVersion=$(curl -fs "https://egnyte-cdn.egnyte.com/egnytedrive/mac/en-us/versions/default.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' | cut -d '"' -f 2)
expectedTeamID="FELUD555VC"
blockingProcesses=( NONE )
;;

View File

@@ -2,7 +2,8 @@ firefox)
name="Firefox"
type="dmg"
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "LATEST_FIREFOX_VERSION")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
printlog "WARNING for ERROR: Label firefox and firefox_intl should not be used. Instead use firefoxpkg and firefoxpkg_intl as per recommendations from Firefox. It's not fully certain that the app actually gets updated here. firefoxpkg and firefoxpkg_intl will have built in updates and make sure the client is updated in the future." REQ

View File

@@ -2,7 +2,8 @@ firefox_da)
name="Firefox"
type="dmg"
downloadURL="https://download.mozilla.org/?product=firefox-latest&amp;os=osx&amp;lang=da"
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "LATEST_FIREFOX_VERSION")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
printlog "WARNING for ERROR: Label firefox, firefox_da and firefox_intl should not be used. Instead use firefoxpkg and firefoxpkg_intl as per recommendations from Firefox. It's not fully certain that the app actually gets updated here. firefoxpkg and firefoxpkg_intl will have built in updates and make sure the client is updated in the future." REQ

View File

@@ -19,7 +19,8 @@ firefox_intl)
printlog "Download not found for '$userLanguage', using default ('en-US')."
downloadURL="https://download.mozilla.org/?product=firefox-latest-ssl&os=osx"
fi
appNewVersion=$(curl -fsIL $downloadURL | awk -F releases/ '/Location:/ {split($2,a,"/"); print a[1]}')
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "LATEST_FIREFOX_VERSION")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
printlog "WARNING for ERROR: Label firefox and firefox_intl should not be used. Instead use firefoxpkg and firefoxpkg_intl as per recommendations from Firefox. It's not fully certain that the app actually gets updated here. firefoxpkg and firefoxpkg_intl will have built in updates and make sure the client is updated in the future." REQ

View File

@@ -3,7 +3,8 @@ firefoxesrpkg)
name="Firefox"
type="pkg"
downloadURL="https://download.mozilla.org/?product=firefox-esr-pkg-latest-ssl&os=osx"
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i "^location" | awk '{print $2}' | sed -E 's/.*releases\/([0-9.]*)esr.*/\1/g')
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "FIREFOX_ESR")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
;;

View File

@@ -19,7 +19,8 @@ firefoxesr_intl)
printlog "Download not found for '$userLanguage', using default ('en-US')."
downloadURL="https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=osx"
fi
appNewVersion=$(curl -fsIL $downloadURL | awk -F releases/ '/Location:/ {split($2,a,"esr/"); print a[1]}')
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "LATEST_FIREFOX_VERSION")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
printlog "WARNING for ERROR: Label firefox and firefox_intl should not be used. Instead use firefoxpkg and firefoxpkg_intl as per recommendations from Firefox. It's not fully certain that the app actually gets updated here. firefoxpkg and firefoxpkg_intl will have built in updates and make sure the client is updated in the future." REQ

View File

@@ -2,7 +2,8 @@ firefoxpkg)
name="Firefox"
type="pkg"
downloadURL="https://download.mozilla.org/?product=firefox-pkg-latest-ssl&os=osx&lang=en-US"
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "LATEST_FIREFOX_VERSION")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
;;

View File

@@ -18,7 +18,8 @@ firefoxpkg_intl)
printlog "Download not found for that language. Using en-US" WARN
downloadURL="https://download.mozilla.org/?product=firefox-pkg-latest-ssl&os=osx&lang=en-US"
fi
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location | cut -d "/" -f7)
firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
appNewVersion=$(getJSONValue "$firefoxVersions" "LATEST_FIREFOX_VERSION")
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
;;

View File

@@ -0,0 +1,10 @@
googlechromeenterprise)
name="Google Chrome"
type="pkg"
downloadURL="https://dl.google.com/dl/chrome/mac/universal/stable/gcem/GoogleChrome.pkg"
appNewVersion=$(curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac_arm64,stable/{print $3; exit}')
expectedTeamID="EQHXZ8M8AV"
updateTool="/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/MacOS/GoogleSoftwareUpdateAgent"
updateToolArguments=( -runMode oneshot -userInitiated YES )
updateToolRunAsCurrentUser=1
;;

View File

@@ -2,6 +2,7 @@ marathon)
name="Marathon"
type="dmg"
archiveName="Marathon-[0-9.]*-Mac.dmg"
versionKey="CFBundleVersion"
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
expectedTeamID="E8K89CXZE7"

View File

@@ -2,6 +2,7 @@ marathon2)
name="Marathon 2"
type="dmg"
archiveName="Marathon2-[0-9.]*-Mac.dmg"
versionKey="CFBundleVersion"
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
expectedTeamID="E8K89CXZE7"

View File

@@ -2,6 +2,7 @@ marathoninfinity)
name="Marathon Infinity"
type="dmg"
archiveName="MarathonInfinity-[0-9.]*-Mac.dmg"
versionKey="CFBundleVersion"
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
expectedTeamID="E8K89CXZE7"

View File

@@ -2,6 +2,10 @@ miro)
# credit: @matins
name="Miro"
type="dmg"
if [[ $(arch) == arm64 ]]; then
downloadURL="https://desktop.miro.com/platforms/darwin-arm64/Miro.dmg"
elif [[ $(arch) == i386 ]]; then
downloadURL="https://desktop.miro.com/platforms/darwin/Miro.dmg"
fi
expectedTeamID="M3GM7MFY7U"
;;

View File

@@ -0,0 +1,8 @@
mmhmm)
name="mmhmm"
type="pkg"
downloadURL="https://updates.mmhmm.app/mac/mmhmm.pkg"
curlOptions=( -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15" )
appNewVersion=$(curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" -fs "https://help.mmhmm.app/hc/en-us/articles/4420969712151-mmhmm-for-Mac" | grep 'The latest version of mmhmm for Mac is <strong>*' | sed -e 's/.*\<strong\>\(.*\)\.\<\/strong\>.*/\1/')
expectedTeamID="M3KUT44L48"
;;

View File

@@ -0,0 +1,7 @@
nordlayer)
# credit: Taboc741 (https://github.com/taboc741)
name="NordLayer"
type="pkg"
downloadURL="https://downloads.nordlayer.com/mac/latest/NordLayer.pkg"
expectedTeamID="W5W395V82Y"
;;

View File

@@ -4,9 +4,10 @@ notion)
type="dmg"
if [[ $(arch) == "arm64" ]]; then
downloadURL="https://www.notion.so/desktop/apple-silicon/download"
appNewVersion=$( curl -fsIL "https://www.notion.so/desktop/apple-silicon/download" | grep -i "^location" | awk '{print $2}' | sed -e 's/.*Notion\-\(.*\)\-arm64.dmg.*/\1/' )
elif [[ $(arch) == "i386" ]]; then
downloadURL="https://www.notion.so/desktop/mac/download"
appNewVersion=$( curl -fsIL "https://www.notion.so/desktop/mac/download" | grep -i "^location" | awk '{print $2}' | sed -e 's/.*Notion\-\(.*\).dmg.*/\1/' )
fi
appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | awk '{print $2}' | tr -d '\r\n' | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' )
expectedTeamID="LBQJ96FQ8D"
;;

View File

@@ -1,6 +1,6 @@
ringcentralapp)
# credit: Isaac Ordonez, Mann consulting (@mannconsulting)
name="Ringcentral"
name="RingCentral"
type="pkg"
if [[ $(arch) != "i386" ]]; then
downloadURL="https://app.ringcentral.com/download/RingCentral-arm64.pkg"
@@ -8,5 +8,5 @@ ringcentralapp)
downloadURL="https://app.ringcentral.com/download/RingCentral.pkg"
fi
expectedTeamID="M932RC5J66"
blockingProcesses=( "Ringcentral" )
blockingProcesses=( "RingCentral" )
;;

View File

@@ -0,0 +1,7 @@
whatroute)
name="WhatRoute"
type="zip"
downloadURL="$(curl -fs https://www.whatroute.net/whatroute2appcast.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2)"
appNewVersion="$(curl -fs https://www.whatroute.net/whatroute2appcast.xml | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2)"
expectedTeamID="H5879E8LML"
;;

View File

@@ -127,6 +127,8 @@ if [[ $buildScript -eq 1 ]]; then
echo "# copying script to $repo_dir/Installomator.sh"
cp $destination_file $repo_dir/Installomator.sh
chmod 755 $repo_dir/Installomator.sh
# also update Labels.txt
$repo_dir/Installomator.sh | tail -n +2 > $repo_dir/Labels.txt
fi
# build a pkg when flag is set