mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
implemented option to overwrite main script
This commit is contained in:
660
Installomator.sh
660
Installomator.sh
@@ -16,9 +16,6 @@ label="" # if no label is sent to the script, this will be used
|
|||||||
#
|
#
|
||||||
# with contributions from many others
|
# with contributions from many others
|
||||||
|
|
||||||
VERSION='0.6.0'
|
|
||||||
VERSIONDATE='2021-07-14'
|
|
||||||
|
|
||||||
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||||
|
|
||||||
# NOTE: adjust these variables:
|
# NOTE: adjust these variables:
|
||||||
@@ -188,7 +185,8 @@ REOPEN="yes"
|
|||||||
# - updateToolRunAsCurrentUser:
|
# - updateToolRunAsCurrentUser:
|
||||||
# When this variable is set (any value), $updateTool will be run as the current user.
|
# When this variable is set (any value), $updateTool will be run as the current user.
|
||||||
#
|
#
|
||||||
|
VERSION="0.7.0b1"
|
||||||
|
VERSIONDATE="2021-08-17"
|
||||||
|
|
||||||
# MARK: Functions
|
# MARK: Functions
|
||||||
|
|
||||||
@@ -860,6 +858,24 @@ longversion)
|
|||||||
printlog "Installomater: version $VERSION ($VERSIONDATE)"
|
printlog "Installomater: version $VERSION ($VERSIONDATE)"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
valuesfromarguments)
|
||||||
|
if [[ -z $name ]]; then
|
||||||
|
printlog "need to provide 'name'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -z $type ]]; then
|
||||||
|
printlog "need to provide 'type'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -z $downloadURL ]]; then
|
||||||
|
printlog "need to provide 'downloadURL'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ -z $expectedTeamID ]]; then
|
||||||
|
printlog "need to provide 'expectedTeamID'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
# label descriptions start here
|
# label descriptions start here
|
||||||
1password7)
|
1password7)
|
||||||
@@ -912,21 +928,21 @@ adobeconnect)
|
|||||||
appNewVersion=$(curl -fs https://helpx.adobe.com/adobe-connect/connect-downloads-updates.html | grep "Mac" | grep version | head -1 | sed -E 's/.*\(version ([0-9\.]*),.*/\1/g')
|
appNewVersion=$(curl -fs https://helpx.adobe.com/adobe-connect/connect-downloads-updates.html | grep "Mac" | grep version | head -1 | sed -E 's/.*\(version ([0-9\.]*),.*/\1/g')
|
||||||
expectedTeamID="JQ525L2MZD"
|
expectedTeamID="JQ525L2MZD"
|
||||||
;;
|
;;
|
||||||
adobereaderdc|\
|
adobereaderdc-update)
|
||||||
adobereaderdc-install)
|
|
||||||
name="Adobe Acrobat Reader DC"
|
name="Adobe Acrobat Reader DC"
|
||||||
type="pkgInDmg"
|
type="pkgInDmg"
|
||||||
packageID="com.adobe.acrobat.DC.reader.app.pkg.MUI"
|
downloadURL=$(adobecurrent=`curl --fail --silent https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.'` && echo http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/"$adobecurrent"/AcroRdrDCUpd"$adobecurrent"_MUI.dmg)
|
||||||
downloadURL=$(curl --silent --fail -H "Sec-Fetch-Site: same-origin" -H "Accept-Encoding: gzip, deflate, br" -H "Accept-Language: en-US;q=0.9,en;q=0.8" -H "DNT: 1" -H "Sec-Fetch-Mode: cors" -H "X-Requested-With: XMLHttpRequest" -H "Referer: https://get.adobe.com/reader/enterprise/" -H "Accept: */*" "https://get.adobe.com/reader/webservices/json/standalone/?platform_type=Macintosh&platform_dist=OSX&platform_arch=x86-32&language=English&eventname=readerotherversions" | grep -Eo '"download_url":.*?[^\\]",' | head -n 1 | cut -d \" -f 4)
|
|
||||||
appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt)
|
appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt)
|
||||||
#appNewVersion=$(curl -s -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15)" https://get.adobe.com/reader/ | grep ">Version" | sed -E 's/.*Version 20([0-9.]*)<.*/\1/g') # credit: Søren Theilgaard (@theilgaard)
|
#appNewVersion=$(curl -s -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15)" https://get.adobe.com/reader/ | grep ">Version" | sed -E 's/.*Version 20([0-9.]*)<.*/\1/g') # credit: Søren Theilgaard (@theilgaard)
|
||||||
expectedTeamID="JQ525L2MZD"
|
expectedTeamID="JQ525L2MZD"
|
||||||
blockingProcesses=( "AdobeReader" )
|
blockingProcesses=( "AdobeReader" )
|
||||||
;;
|
;;
|
||||||
adobereaderdc-update)
|
adobereaderdc|\
|
||||||
|
adobereaderdc-install)
|
||||||
name="Adobe Acrobat Reader DC"
|
name="Adobe Acrobat Reader DC"
|
||||||
type="pkgInDmg"
|
type="pkgInDmg"
|
||||||
downloadURL=$(adobecurrent=`curl --fail --silent https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt | tr -d '.'` && echo http://ardownload.adobe.com/pub/adobe/reader/mac/AcrobatDC/"$adobecurrent"/AcroRdrDCUpd"$adobecurrent"_MUI.dmg)
|
packageID="com.adobe.acrobat.DC.reader.app.pkg.MUI"
|
||||||
|
downloadURL=$(curl --silent --fail -H "Sec-Fetch-Site: same-origin" -H "Accept-Encoding: gzip, deflate, br" -H "Accept-Language: en-US;q=0.9,en;q=0.8" -H "DNT: 1" -H "Sec-Fetch-Mode: cors" -H "X-Requested-With: XMLHttpRequest" -H "Referer: https://get.adobe.com/reader/enterprise/" -H "Accept: */*" "https://get.adobe.com/reader/webservices/json/standalone/?platform_type=Macintosh&platform_dist=OSX&platform_arch=x86-32&language=English&eventname=readerotherversions" | grep -Eo '"download_url":.*?[^\]",' | head -n 1 | cut -d \" -f 4)
|
||||||
appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt)
|
appNewVersion=$(curl -s https://armmf.adobe.com/arm-manifests/mac/AcrobatDC/reader/current_version.txt)
|
||||||
#appNewVersion=$(curl -s -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15)" https://get.adobe.com/reader/ | grep ">Version" | sed -E 's/.*Version 20([0-9.]*)<.*/\1/g') # credit: Søren Theilgaard (@theilgaard)
|
#appNewVersion=$(curl -s -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15)" https://get.adobe.com/reader/ | grep ">Version" | sed -E 's/.*Version 20([0-9.]*)<.*/\1/g') # credit: Søren Theilgaard (@theilgaard)
|
||||||
expectedTeamID="JQ525L2MZD"
|
expectedTeamID="JQ525L2MZD"
|
||||||
@@ -1020,11 +1036,11 @@ applenyfonts)
|
|||||||
packageID="com.apple.pkg.NYFonts"
|
packageID="com.apple.pkg.NYFonts"
|
||||||
expectedTeamID="Development Update"
|
expectedTeamID="Development Update"
|
||||||
;;
|
;;
|
||||||
applesfpro)
|
applesfcompact)
|
||||||
name="San Francisco Pro"
|
name="San Francisco Compact"
|
||||||
type="pkgInDmg"
|
type="pkgInDmg"
|
||||||
downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Font-Pro.dmg"
|
downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Font-Compact.dmg"
|
||||||
packageID="com.apple.pkg.SanFranciscoPro"
|
packageID="com.apple.pkg.SanFranciscoCompact"
|
||||||
expectedTeamID="Development Update"
|
expectedTeamID="Development Update"
|
||||||
;;
|
;;
|
||||||
applesfmono)
|
applesfmono)
|
||||||
@@ -1034,11 +1050,11 @@ applesfmono)
|
|||||||
packageID="com.apple.pkg.SFMonoFonts"
|
packageID="com.apple.pkg.SFMonoFonts"
|
||||||
expectedTeamID="Software Update"
|
expectedTeamID="Software Update"
|
||||||
;;
|
;;
|
||||||
applesfcompact)
|
applesfpro)
|
||||||
name="San Francisco Compact"
|
name="San Francisco Pro"
|
||||||
type="pkgInDmg"
|
type="pkgInDmg"
|
||||||
downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Font-Compact.dmg"
|
downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Font-Pro.dmg"
|
||||||
packageID="com.apple.pkg.SanFranciscoCompact"
|
packageID="com.apple.pkg.SanFranciscoPro"
|
||||||
expectedTeamID="Development Update"
|
expectedTeamID="Development Update"
|
||||||
;;
|
;;
|
||||||
aquaskk)
|
aquaskk)
|
||||||
@@ -1647,12 +1663,6 @@ googlechromepkg)
|
|||||||
updateToolArguments=( -runMode oneshot -userInitiated YES )
|
updateToolArguments=( -runMode oneshot -userInitiated YES )
|
||||||
updateToolRunAsCurrentUser=1
|
updateToolRunAsCurrentUser=1
|
||||||
;;
|
;;
|
||||||
googleearth)
|
|
||||||
name="Google Earth Pro"
|
|
||||||
type="pkgInDmg"
|
|
||||||
downloadURL="https://dl.google.com/earth/client/advanced/current/GoogleEarthProMac-Intel.dmg"
|
|
||||||
expectedTeamID="EQHXZ8M8AV"
|
|
||||||
;;
|
|
||||||
googledrive|\
|
googledrive|\
|
||||||
googledrivefilestream)
|
googledrivefilestream)
|
||||||
# credit: Isaac Ordonez, Mann consulting (@mannconsulting)
|
# credit: Isaac Ordonez, Mann consulting (@mannconsulting)
|
||||||
@@ -1669,6 +1679,12 @@ googledrivebackupandsync)
|
|||||||
downloadURL="https://dl.google.com/drive/InstallBackupAndSync.dmg"
|
downloadURL="https://dl.google.com/drive/InstallBackupAndSync.dmg"
|
||||||
expectedTeamID="EQHXZ8M8AV"
|
expectedTeamID="EQHXZ8M8AV"
|
||||||
;;
|
;;
|
||||||
|
googleearth)
|
||||||
|
name="Google Earth Pro"
|
||||||
|
type="pkgInDmg"
|
||||||
|
downloadURL="https://dl.google.com/earth/client/advanced/current/GoogleEarthProMac-Intel.dmg"
|
||||||
|
expectedTeamID="EQHXZ8M8AV"
|
||||||
|
;;
|
||||||
googlejapaneseinput)
|
googlejapaneseinput)
|
||||||
# credit: Tadayuki Onishi (@kenchan0130)
|
# credit: Tadayuki Onishi (@kenchan0130)
|
||||||
name="GoogleJapaneseInput"
|
name="GoogleJapaneseInput"
|
||||||
@@ -1935,13 +1951,6 @@ karabinerelements)
|
|||||||
appNewVersion=$(versionFromGit pqrs-org Karabiner-Elements)
|
appNewVersion=$(versionFromGit pqrs-org Karabiner-Elements)
|
||||||
expectedTeamID="G43BCU2T37"
|
expectedTeamID="G43BCU2T37"
|
||||||
;;
|
;;
|
||||||
keyboardmaestro)
|
|
||||||
# credit: Gabe Marchan (gabemarchan.com - @darklink87)
|
|
||||||
name="Keyboard Maestro"
|
|
||||||
type="zip"
|
|
||||||
downloadURL="https://download.keyboardmaestro.com/"
|
|
||||||
expectedTeamID="QMHRBA4LGH"
|
|
||||||
;;
|
|
||||||
keepassxc)
|
keepassxc)
|
||||||
name="KeePassXC"
|
name="KeePassXC"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
@@ -2095,6 +2104,215 @@ menumeters)
|
|||||||
appNewVersion=$(versionFromGit yujitach MenuMeters )
|
appNewVersion=$(versionFromGit yujitach MenuMeters )
|
||||||
expectedTeamID="95AQ7YKR5A"
|
expectedTeamID="95AQ7YKR5A"
|
||||||
;;
|
;;
|
||||||
|
microsoftautoupdate)
|
||||||
|
name="Microsoft AutoUpdate"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=830196"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.autoupdate.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "Microsoft_AutoUpdate.*pkg" | sed -E 's/[a-zA-Z_]*_([0-9.]*)_.*/\1/g' | cut -d "." -f 1-2)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
# commented the updatetool for MSAutoupdate, because when Autoupdate is really
|
||||||
|
# old or broken, you want to force a new install
|
||||||
|
#updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
#updateToolArguments=( --install --apps MSau04 )
|
||||||
|
;;
|
||||||
|
microsoftcompanyportal)
|
||||||
|
name="Company Portal"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=869655"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.intunecompanyportal.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps IMCP01 )
|
||||||
|
;;
|
||||||
|
microsoftdefenderatp)
|
||||||
|
name="Microsoft Defender ATP"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=2097502"
|
||||||
|
appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.defender.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
||||||
|
# No version number in download url
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps WDAV00 )
|
||||||
|
;;
|
||||||
|
microsoftedge|\
|
||||||
|
microsoftedgeconsumerstable)
|
||||||
|
name="Microsoft Edge"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=2069148"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/cfbundleversion' 2>/dev/null | sed -E 's/<cfbundleversion>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps EDGE01 )
|
||||||
|
;;
|
||||||
|
microsoftedgeenterprisestable)
|
||||||
|
name="Microsoft Edge"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=2093438"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps EDGE01 )
|
||||||
|
;;
|
||||||
|
microsoftexcel)
|
||||||
|
name="Microsoft Excel"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=525135"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.excel.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps XCEL2019 )
|
||||||
|
;;
|
||||||
|
microsoftlicenseremovaltool)
|
||||||
|
# credit: Isaac Ordonez (@isaac) macadmins slack
|
||||||
|
name="Microsoft License Removal Tool"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=849815"
|
||||||
|
expectedTeamID="QGS93ZLCU7"
|
||||||
|
appNewVersion=$(curl -is "$downloadURL" | grep ocation: | grep -o "Microsoft_.*pkg" | cut -d "_" -f 5 | cut -d "." -f1-2)
|
||||||
|
Company="Microsoft"
|
||||||
|
;;
|
||||||
|
microsoftoffice365)
|
||||||
|
name="MicrosoftOffice365"
|
||||||
|
type="pkg"
|
||||||
|
packageID="com.microsoft.pkg.licensing"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=525133"
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
# using MS PowerPoint as the 'stand-in' for the entire suite
|
||||||
|
#appName="Microsoft PowerPoint.app"
|
||||||
|
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" )
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install )
|
||||||
|
;;
|
||||||
|
microsoftofficebusinesspro)
|
||||||
|
name="MicrosoftOfficeBusinessPro"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=2009112"
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
# using MS PowerPoint as the 'stand-in' for the entire suite
|
||||||
|
appName="Microsoft PowerPoint.app"
|
||||||
|
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" "Teams")
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install )
|
||||||
|
;;
|
||||||
|
microsoftonedrive)
|
||||||
|
name="OneDrive"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=823060"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onedrive.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps ONDR18 )
|
||||||
|
;;
|
||||||
|
microsoftonenote)
|
||||||
|
name="Microsoft OneNote"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=820886"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onenote.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps ONMC2019 )
|
||||||
|
;;
|
||||||
|
microsoftoutlook)
|
||||||
|
name="Microsoft Outlook"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=525137"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.outlook.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps OPIM2019 )
|
||||||
|
;;
|
||||||
|
microsoftpowerpoint)
|
||||||
|
name="Microsoft PowerPoint"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=525136"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.powerpoint.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps PPT32019 )
|
||||||
|
;;
|
||||||
|
microsoftremotedesktop)
|
||||||
|
name="Microsoft Remote Desktop"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=868963"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.remotedesktop.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps MSRD10 )
|
||||||
|
;;
|
||||||
|
microsoftsharepointplugin)
|
||||||
|
# Microsoft has marked this "oldpackage", should probably not be used anymore
|
||||||
|
name="MicrosoftSharePointPlugin"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=800050"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.sharepointplugin.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
# TODO: determine blockingProcesses for SharePointPlugin
|
||||||
|
;;
|
||||||
|
microsoftskypeforbusiness)
|
||||||
|
name="Skype for Business"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=832978"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.skypeforbusiness.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps MSFB16 )
|
||||||
|
;;
|
||||||
|
microsoftteams)
|
||||||
|
name="Microsoft Teams"
|
||||||
|
type="pkg"
|
||||||
|
#packageID="com.microsoft.teams"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=869428"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.teams.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
||||||
|
# Still using macadmin.software for version, as the path does not contain the version in a matching format. packageID can be used, but version is the same.
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
blockingProcesses=( Teams "Microsoft Teams Helper" )
|
||||||
|
# Commenting out msupdate as it is not really supported *yet* for teams
|
||||||
|
# updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
# updateToolArguments=( --install --apps TEAM01 )
|
||||||
|
;;
|
||||||
|
microsoftvisualstudiocode|\
|
||||||
|
visualstudiocode)
|
||||||
|
name="Visual Studio Code"
|
||||||
|
type="zip"
|
||||||
|
#downloadURL="https://go.microsoft.com/fwlink/?LinkID=620882" # Intel only
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?LinkID=2156837" # Universal
|
||||||
|
appNewVersion=$(curl -fsL "https://code.visualstudio.com/Updates" | grep "/darwin" | grep -oiE ".com/([^>]+)([^<]+)/darwin" | cut -d "/" -f 2 | sed $'s/[^[:print:] ]//g' | head -1 )
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
appName="Visual Studio Code.app"
|
||||||
|
blockingProcesses=( Code )
|
||||||
|
;;
|
||||||
|
microsoftword)
|
||||||
|
name="Microsoft Word"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=525134"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.word.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
updateToolArguments=( --install --apps MSWD2019 )
|
||||||
|
;;
|
||||||
|
microsoftyammer)
|
||||||
|
name="Yammer"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL="https://aka.ms/yammer_desktop_mac"
|
||||||
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.yammer.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
|
expectedTeamID="UBF8T346G9"
|
||||||
|
#updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
|
#updateToolArguments=( --install --apps ?????? )
|
||||||
|
;;
|
||||||
miro)
|
miro)
|
||||||
# credit: @matins
|
# credit: @matins
|
||||||
name="Miro"
|
name="Miro"
|
||||||
@@ -2891,16 +3109,6 @@ vscodium)
|
|||||||
appName="VSCodium.app"
|
appName="VSCodium.app"
|
||||||
blockingProcesses=( Electron )
|
blockingProcesses=( Electron )
|
||||||
;;
|
;;
|
||||||
webexmeetings)
|
|
||||||
# credit: Erik Stam (@erikstam)
|
|
||||||
name="Cisco Webex Meetings"
|
|
||||||
type="pkgInDmg"
|
|
||||||
downloadURL="https://akamaicdn.webex.com/client/webexapp.dmg"
|
|
||||||
expectedTeamID="DE8Y96K9QP"
|
|
||||||
targetDir="/Applications"
|
|
||||||
#blockingProcessesMaxCPU="5"
|
|
||||||
blockingProcesses=( Webex )
|
|
||||||
;;
|
|
||||||
webex|\
|
webex|\
|
||||||
webexteams)
|
webexteams)
|
||||||
# credit: Erik Stam (@erikstam)
|
# credit: Erik Stam (@erikstam)
|
||||||
@@ -2913,6 +3121,23 @@ webexteams)
|
|||||||
fi
|
fi
|
||||||
expectedTeamID="DE8Y96K9QP"
|
expectedTeamID="DE8Y96K9QP"
|
||||||
;;
|
;;
|
||||||
|
webexmeetings)
|
||||||
|
# credit: Erik Stam (@erikstam)
|
||||||
|
name="Cisco Webex Meetings"
|
||||||
|
type="pkgInDmg"
|
||||||
|
downloadURL="https://akamaicdn.webex.com/client/webexapp.dmg"
|
||||||
|
expectedTeamID="DE8Y96K9QP"
|
||||||
|
targetDir="/Applications"
|
||||||
|
#blockingProcessesMaxCPU="5"
|
||||||
|
blockingProcesses=( Webex )
|
||||||
|
;;
|
||||||
|
webexteams)
|
||||||
|
# credit: Erik Stam (@erikstam)
|
||||||
|
name="Webex Teams"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL="https://binaries.webex.com/WebexTeamsDesktop-MACOS-Gold/WebexTeams.dmg"
|
||||||
|
expectedTeamID="DE8Y96K9QP"
|
||||||
|
;;
|
||||||
whatsapp)
|
whatsapp)
|
||||||
name="WhatsApp"
|
name="WhatsApp"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
@@ -2951,6 +3176,12 @@ wwdc)
|
|||||||
appNewVersion=$(versionFromGit insidegui WWDC)
|
appNewVersion=$(versionFromGit insidegui WWDC)
|
||||||
expectedTeamID="8C7439RJLG"
|
expectedTeamID="8C7439RJLG"
|
||||||
;;
|
;;
|
||||||
|
xeroxphaser7800)
|
||||||
|
name="XeroxPhaser"
|
||||||
|
type="pkgInDmg"
|
||||||
|
downloadURL=$(curl -fs "https://www.support.xerox.com/en-us/product/phaser-7800/downloads?platform=macOSx11" | xmllint --html --format - 2>/dev/null | grep -o "https://.*XeroxDrivers.*.dmg")
|
||||||
|
expectedTeamID="G59Y3XFNFR"
|
||||||
|
;;
|
||||||
xink)
|
xink)
|
||||||
name="Xink"
|
name="Xink"
|
||||||
type="zip"
|
type="zip"
|
||||||
@@ -2975,12 +3206,6 @@ yubikeymanagerqt)
|
|||||||
appNewVersion=$(versionFromGit Yubico yubikey-manager-qt)
|
appNewVersion=$(versionFromGit Yubico yubikey-manager-qt)
|
||||||
expectedTeamID="LQA3CS5MM7"
|
expectedTeamID="LQA3CS5MM7"
|
||||||
;;
|
;;
|
||||||
xeroxphaser7800)
|
|
||||||
name="XeroxPhaser"
|
|
||||||
type="pkgInDmg"
|
|
||||||
downloadURL=$(curl -fs "https://www.support.xerox.com/en-us/product/phaser-7800/downloads?platform=macOSx11" | xmllint --html --format - 2>/dev/null | grep -o "https://.*XeroxDrivers.*.dmg")
|
|
||||||
expectedTeamID="G59Y3XFNFR"
|
|
||||||
;;
|
|
||||||
zappy)
|
zappy)
|
||||||
name="Zappy"
|
name="Zappy"
|
||||||
type="appInDmgInZip"
|
type="appInDmgInZip"
|
||||||
@@ -3054,347 +3279,6 @@ zulujdk15)
|
|||||||
appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" }
|
appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" }
|
||||||
appNewVersion=$(echo "$downloadURL" | cut -d "-" -f 1 | sed -e "s/.*zulu//") # Cannot be compared to anything
|
appNewVersion=$(echo "$downloadURL" | cut -d "-" -f 1 | sed -e "s/.*zulu//") # Cannot be compared to anything
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# MARK: Add new labels after this line (let us sort them in the list)
|
|
||||||
|
|
||||||
|
|
||||||
# MARK: Add new labels above here
|
|
||||||
|
|
||||||
#cdef)
|
|
||||||
# # cdef currently not signed
|
|
||||||
# # credit: Søren Theilgaard (@theilgaard)
|
|
||||||
# name="cdef"
|
|
||||||
# type="pkg"
|
|
||||||
# downloadURL=$(downloadURLFromGit Shufflepuck cdef)
|
|
||||||
# appNewVersion=$(versionFromGit Shufflepuck cdef)
|
|
||||||
# #expectedTeamID="EM3ER8T33A"
|
|
||||||
# ;;
|
|
||||||
#fontforge)
|
|
||||||
# # FontForge Not signed
|
|
||||||
# # credit: Søren Theilgaard (@theilgaard)
|
|
||||||
# name="FontForge"
|
|
||||||
# type="dmg"
|
|
||||||
# downloadURL=$(downloadURLFromGit fontforge fontforge)
|
|
||||||
# appNewVersion=$(versionFromGit fontforge fontforge)
|
|
||||||
# expectedTeamID=""
|
|
||||||
# ;;
|
|
||||||
#notifier)
|
|
||||||
# # not signed
|
|
||||||
# # credit: Søren Theilgaard (@theilgaard)
|
|
||||||
# name="dataJAR Notifier"
|
|
||||||
# type="pkg"
|
|
||||||
# #packageID="uk.co.dataJAR.Notifier" # Version 2.2.3 was actually "uk.co.dataJAR.Notifier-2.2.3" so unusable
|
|
||||||
# downloadURL=$(downloadURLFromGit dataJAR Notifier)
|
|
||||||
# appNewVersion=$(versionFromGit dataJAR Notifier)
|
|
||||||
# expectedTeamID=""
|
|
||||||
# blockingProcesses=( "Notifier" )
|
|
||||||
# ;;
|
|
||||||
# packages)
|
|
||||||
# NOTE: Packages is signed but _not_ notarized, so spctl will reject it
|
|
||||||
# name="Packages"
|
|
||||||
# type="pkgInDmg"
|
|
||||||
# pkgName="Install Packages.pkg"
|
|
||||||
# downloadURL="http://s.sudre.free.fr/Software/files/Packages.dmg"
|
|
||||||
# expectedTeamID="NL5M9E394P"
|
|
||||||
# ;;
|
|
||||||
# powershell)
|
|
||||||
# NOTE: powershell installers are not notarized
|
|
||||||
# # credit: Tadayuki Onishi (@kenchan0130)
|
|
||||||
# name="PowerShell"
|
|
||||||
# type="pkg"
|
|
||||||
# downloadURL=$(curl -fs "https://api.github.com/repos/Powershell/Powershell/releases/latest" \
|
|
||||||
# | awk -F '"' '/browser_download_url/ && /pkg/ { print $4 }' | grep -v lts )
|
|
||||||
# expectedTeamID="UBF8T346G9"
|
|
||||||
# ;;
|
|
||||||
# powershell-lts)
|
|
||||||
# NOTE: powershell installers are not notarized
|
|
||||||
# # credit: Tadayuki Onishi (@kenchan0130)
|
|
||||||
# name="PowerShell"
|
|
||||||
# type="pkg"
|
|
||||||
# downloadURL=$(curl -fs "https://api.github.com/repos/Powershell/Powershell/releases/latest" \
|
|
||||||
# | awk -F '"' '/browser_download_url/ && /pkg/ { print $4 }' | grep lts)
|
|
||||||
# expectedTeamID="UBF8T346G9"
|
|
||||||
# ;;
|
|
||||||
# vmwarefusion)
|
|
||||||
# TODO: vmwarefusion installation process needs testing
|
|
||||||
# # credit: Erik Stam (@erikstam)
|
|
||||||
# name="VMware Fusion"
|
|
||||||
# type="dmg"
|
|
||||||
# downloadURL="https://www.vmware.com/go/getfusion"
|
|
||||||
# appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | awk '{print $2}' | sed -E 's/.*Fusion-([0-9.]*)-.*/\1/g' )
|
|
||||||
# expectedTeamID="EG7KH642X6"
|
|
||||||
# ;;
|
|
||||||
#wordmat)
|
|
||||||
# # WordMat currently not signed
|
|
||||||
# # credit: Søren Theilgaard (@theilgaard)
|
|
||||||
# name="WordMat"
|
|
||||||
# type="pkg"
|
|
||||||
# packageID="com.eduap.pkg.WordMat"
|
|
||||||
# downloadURL=$(downloadURLFromGit Eduap-com WordMat)
|
|
||||||
# #downloadURL=$(curl -fs "https://api.github.com/repos/Eduap-com/WordMat/releases/latest" | awk -F '"' "/browser_download_url/ && /pkg/ && ! /sig/ && ! /CLI/ && ! /sha256/ { print \$4 }")
|
|
||||||
# appNewVersion=$(versionFromGit Eduap-com WordMat)
|
|
||||||
# #curl -fs "https://api.github.com/repos/Eduap-com/WordMat/releases/latest" | grep tag_name | cut -d '"' -f 4 | sed 's/[^0-9\.]//g'
|
|
||||||
# expectedTeamID=""
|
|
||||||
# ;;
|
|
||||||
|
|
||||||
|
|
||||||
# MARK: Microsoft
|
|
||||||
|
|
||||||
# msupdate codes from:
|
|
||||||
# https://docs.microsoft.com/en-us/deployoffice/mac/update-office-for-mac-using-msupdate
|
|
||||||
|
|
||||||
# download link IDs from: https://macadmin.software
|
|
||||||
|
|
||||||
microsoftautoupdate)
|
|
||||||
name="Microsoft AutoUpdate"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=830196"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.autoupdate.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "Microsoft_AutoUpdate.*pkg" | sed -E 's/[a-zA-Z_]*_([0-9.]*)_.*/\1/g' | cut -d "." -f 1-2)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
# commented the updatetool for MSAutoupdate, because when Autoupdate is really
|
|
||||||
# old or broken, you want to force a new install
|
|
||||||
#updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
#updateToolArguments=( --install --apps MSau04 )
|
|
||||||
;;
|
|
||||||
microsoftcompanyportal)
|
|
||||||
name="Company Portal"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=869655"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.intunecompanyportal.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps IMCP01 )
|
|
||||||
;;
|
|
||||||
microsoftdefenderatp)
|
|
||||||
name="Microsoft Defender ATP"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=2097502"
|
|
||||||
appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.defender.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
|
||||||
# No version number in download url
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps WDAV00 )
|
|
||||||
;;
|
|
||||||
microsoftedge|\
|
|
||||||
microsoftedgeconsumerstable)
|
|
||||||
name="Microsoft Edge"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=2069148"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/cfbundleversion' 2>/dev/null | sed -E 's/<cfbundleversion>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps EDGE01 )
|
|
||||||
;;
|
|
||||||
microsoftedgeenterprisestable)
|
|
||||||
name="Microsoft Edge"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=2093438"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps EDGE01 )
|
|
||||||
;;
|
|
||||||
microsoftexcel)
|
|
||||||
name="Microsoft Excel"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=525135"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.excel.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps XCEL2019 )
|
|
||||||
;;
|
|
||||||
microsoftlicenseremovaltool)
|
|
||||||
# credit: Isaac Ordonez (@isaac) macadmins slack
|
|
||||||
name="Microsoft License Removal Tool"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=849815"
|
|
||||||
expectedTeamID="QGS93ZLCU7"
|
|
||||||
appNewVersion=$(curl -is "$downloadURL" | grep ocation: | grep -o "Microsoft_.*pkg" | cut -d "_" -f 5 | cut -d "." -f1-2)
|
|
||||||
Company="Microsoft"
|
|
||||||
;;
|
|
||||||
microsoftoffice365)
|
|
||||||
name="MicrosoftOffice365"
|
|
||||||
type="pkg"
|
|
||||||
packageID="com.microsoft.pkg.licensing"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=525133"
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
# using MS PowerPoint as the 'stand-in' for the entire suite
|
|
||||||
#appName="Microsoft PowerPoint.app"
|
|
||||||
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" )
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install )
|
|
||||||
;;
|
|
||||||
microsoftofficebusinesspro)
|
|
||||||
name="MicrosoftOfficeBusinessPro"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=2009112"
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
# using MS PowerPoint as the 'stand-in' for the entire suite
|
|
||||||
appName="Microsoft PowerPoint.app"
|
|
||||||
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" "Teams")
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install )
|
|
||||||
;;
|
|
||||||
microsoftonedrive)
|
|
||||||
name="OneDrive"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=823060"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onedrive.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps ONDR18 )
|
|
||||||
;;
|
|
||||||
microsoftonenote)
|
|
||||||
name="Microsoft OneNote"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=820886"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onenote.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps ONMC2019 )
|
|
||||||
;;
|
|
||||||
microsoftoutlook)
|
|
||||||
name="Microsoft Outlook"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=525137"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.outlook.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps OPIM2019 )
|
|
||||||
;;
|
|
||||||
microsoftpowerpoint)
|
|
||||||
name="Microsoft PowerPoint"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=525136"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.powerpoint.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps PPT32019 )
|
|
||||||
;;
|
|
||||||
microsoftremotedesktop)
|
|
||||||
name="Microsoft Remote Desktop"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=868963"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.remotedesktop.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps MSRD10 )
|
|
||||||
;;
|
|
||||||
microsoftsharepointplugin)
|
|
||||||
# Microsoft has marked this "oldpackage", should probably not be used anymore
|
|
||||||
name="MicrosoftSharePointPlugin"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=800050"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.sharepointplugin.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
# TODO: determine blockingProcesses for SharePointPlugin
|
|
||||||
;;
|
|
||||||
microsoftskypeforbusiness)
|
|
||||||
name="Skype for Business"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=832978"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.skypeforbusiness.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps MSFB16 )
|
|
||||||
;;
|
|
||||||
microsoftteams)
|
|
||||||
name="Microsoft Teams"
|
|
||||||
type="pkg"
|
|
||||||
#packageID="com.microsoft.teams"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=869428"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.teams.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
|
||||||
# Still using macadmin.software for version, as the path does not contain the version in a matching format. packageID can be used, but version is the same.
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
blockingProcesses=( Teams "Microsoft Teams Helper" )
|
|
||||||
# Commenting out msupdate as it is not really supported *yet* for teams
|
|
||||||
# updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
# updateToolArguments=( --install --apps TEAM01 )
|
|
||||||
;;
|
|
||||||
microsoftvisualstudiocode|\
|
|
||||||
visualstudiocode)
|
|
||||||
name="Visual Studio Code"
|
|
||||||
type="zip"
|
|
||||||
#downloadURL="https://go.microsoft.com/fwlink/?LinkID=620882" # Intel only
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?LinkID=2156837" # Universal
|
|
||||||
appNewVersion=$(curl -fsL "https://code.visualstudio.com/Updates" | grep "/darwin" | grep -oiE ".com/([^>]+)([^<]+)/darwin" | cut -d "/" -f 2 | sed $'s/[^[:print:]\t]//g' | head -1 )
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
appName="Visual Studio Code.app"
|
|
||||||
blockingProcesses=( Code )
|
|
||||||
;;
|
|
||||||
microsoftword)
|
|
||||||
name="Microsoft Word"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=525134"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.word.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps MSWD2019 )
|
|
||||||
;;
|
|
||||||
microsoftyammer)
|
|
||||||
name="Yammer"
|
|
||||||
type="dmg"
|
|
||||||
downloadURL="https://aka.ms/yammer_desktop_mac"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.yammer.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
#updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
#updateToolArguments=( --install --apps ?????? )
|
|
||||||
;;
|
|
||||||
|
|
||||||
# this description is so you can provide all variables as arguments
|
|
||||||
# it will only check if the required variables are setting
|
|
||||||
valuesfromarguments)
|
|
||||||
if [[ -z $name ]]; then
|
|
||||||
printlog "need to provide 'name'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -z $type ]]; then
|
|
||||||
printlog "need to provide 'type'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -z $downloadURL ]]; then
|
|
||||||
printlog "need to provide 'downloadURL'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -z $expectedTeamID ]]; then
|
|
||||||
printlog "need to provide 'expectedTeamID'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
# these descriptions exist for testing and are intentionally broken
|
|
||||||
brokendownloadurl)
|
|
||||||
name="Google Chrome"
|
|
||||||
type="dmg"
|
|
||||||
downloadURL="https://broken.com/broken.dmg"
|
|
||||||
expectedTeamID="EQHXZ8M8AV"
|
|
||||||
;;
|
|
||||||
brokenappname)
|
|
||||||
name="brokenapp"
|
|
||||||
type="dmg"
|
|
||||||
downloadURL="https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
|
|
||||||
expectedTeamID="EQHXZ8M8AV"
|
|
||||||
;;
|
|
||||||
brokenteamid)
|
|
||||||
name="Google Chrome"
|
|
||||||
type="dmg"
|
|
||||||
downloadURL="https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
|
|
||||||
expectedTeamID="broken"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
# unknown label
|
# unknown label
|
||||||
#printlog "unknown label $label"
|
#printlog "unknown label $label"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# parse arguments
|
# parse arguments
|
||||||
|
|
||||||
zparseopts -D -E -a opts s -script p -pkg n -notarize h -help -labels+:=label_args l+:=label_args
|
zparseopts -D -E -a opts r -run s -script p -pkg n -notarize h -help -labels+:=label_args l+:=label_args
|
||||||
|
|
||||||
if (( ${opts[(I)(-h|--help)]} )); then
|
if (( ${opts[(I)(-h|--help)]} )); then
|
||||||
echo "usage: assemble.sh [--script|--pkg|--notarize] [-labels path/to/labels ...] [arguments...]"
|
echo "usage: assemble.sh [--script|--pkg|--notarize] [-labels path/to/labels ...] [arguments...]"
|
||||||
@@ -12,21 +12,34 @@ if (( ${opts[(I)(-h|--help)]} )); then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# default setting
|
||||||
|
runScript=1
|
||||||
|
|
||||||
if (( ${opts[(I)(-s|--script)]} )); then
|
if (( ${opts[(I)(-s|--script)]} )); then
|
||||||
|
runScript=0
|
||||||
buildScript=1
|
buildScript=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( ${opts[(I)(-p|--pkg)]} )); then
|
if (( ${opts[(I)(-p|--pkg)]} )); then
|
||||||
|
runScript=0
|
||||||
buildScript=1
|
buildScript=1
|
||||||
buildPkg=1
|
buildPkg=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( ${opts[(I)(-n|--notarize)]} )); then
|
if (( ${opts[(I)(-n|--notarize)]} )); then
|
||||||
|
runScript=0
|
||||||
buildScript=1
|
buildScript=1
|
||||||
buildPkg=1
|
buildPkg=1
|
||||||
notarizePkg=1
|
notarizePkg=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# -r/--run option overrides default setting
|
||||||
|
if (( ${opts[(I)(-r|--run)]} )); then
|
||||||
|
runScript=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
label_flags=( -l --labels )
|
label_flags=( -l --labels )
|
||||||
# array substraction
|
# array substraction
|
||||||
label_paths=${label_args:|label_flags}
|
label_paths=${label_args:|label_flags}
|
||||||
@@ -47,13 +60,13 @@ fragment_files=( header.sh version.sh functions.sh arguments.sh main.sh )
|
|||||||
# check if fragment files exist (and are readable)
|
# check if fragment files exist (and are readable)
|
||||||
for fragment in $fragment_files; do
|
for fragment in $fragment_files; do
|
||||||
if [[ ! -e $fragments_dir/$fragment ]]; then
|
if [[ ! -e $fragments_dir/$fragment ]]; then
|
||||||
echo "$fragments_dir/$fragment not found!"
|
echo "# $fragments_dir/$fragment not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ! -d $labels_dir ]]; then
|
if [[ ! -d $labels_dir ]]; then
|
||||||
echo "$labels_dir not found!"
|
echo "# $labels_dir not found!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -81,7 +94,7 @@ for lpath in $label_paths; do
|
|||||||
if [[ -d $lpath ]]; then
|
if [[ -d $lpath ]]; then
|
||||||
cat "$lpath"/*.sh >> $destination_file
|
cat "$lpath"/*.sh >> $destination_file
|
||||||
else
|
else
|
||||||
echo "$lpath not a directory, skipping..."
|
echo "# $lpath not a directory, skipping..."
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -92,12 +105,17 @@ cat "$fragments_dir/main.sh" >> $destination_file
|
|||||||
chmod +x $destination_file
|
chmod +x $destination_file
|
||||||
|
|
||||||
# run script with remaining arguments
|
# run script with remaining arguments
|
||||||
$destination_file "$@"
|
if [[ $runScript -eq 1 ]]; then
|
||||||
|
$destination_file "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: build copy the script to root of repo when flag is set
|
# copy the script to root of repo when flag is set
|
||||||
|
if [[ $buildScript -eq 1 ]]; then
|
||||||
|
echo "# copying script to $repo_dir/Installomator.sh"
|
||||||
|
cp $destination_file $repo_dir/Installomator.sh
|
||||||
|
fi
|
||||||
|
|
||||||
# TODO: build a pkg when flag is set
|
# TODO: build a pkg when flag is set
|
||||||
|
|
||||||
# TODO: notarize when flag is set
|
# TODO: notarize when flag is set
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user