Merge branch 'dev' into MDM-script-with-caffeine

This commit is contained in:
Søren Theilgaard
2021-11-22 10:59:39 +01:00
committed by GitHub
48 changed files with 374 additions and 58 deletions

View File

@@ -1,7 +1,10 @@
## v0.8 ## v0.8
- Installomator now detects when an app is already installed, and will display notifications correctly the user based on if the app was updated or installed for the first time.
- New variables for labels that should be installaed using CLI: `CLIInstaller` and `CLIArguments`. If the installer app is named differently than the installed app, then the variable `installerTool` should be use to name the app that should be located in the DMG or zip. See the label __adobecreativeclouddesktop__ to see its use.
- `buildLabel.sh` has been improved to build GitHub software labels much easier. In essense if the URL contains github.com, then it will try to find if it's the latest version or if variable `archiveName` is needed for finding the software. Also improved messaging throughout the script, as well as handling a situation where a pkg does not include a “DIstribution” file, but a “PackageInfo”. - `buildLabel.sh` has been improved to build GitHub software labels much easier. In essense if the URL contains github.com, then it will try to find if it's the latest version or if variable `archiveName` is needed for finding the software. Also improved messaging throughout the script, as well as handling a situation where a pkg does not include a “DIstribution” file, but a “PackageInfo”.
- MDM script extended with `caffeinate` so Mac will not go to sleep during the time it takes installomator to run. Especially during setup, this can be handy. - MDM script extended with `caffeinate` so Mac will not go to sleep during the time it takes installomator to run. Especially during setup, this can be handy.
- Microsoft labels with `updateTool` variable, is updated to run `msupdate --list` before running the updateTool directly. Problems have been reported that the update would fail if the `--list` parameter for the command was not run first.
## v0.7 ## v0.7

View File

@@ -1280,6 +1280,7 @@ boxsync)
boxtools) boxtools)
name="Box Tools" name="Box Tools"
type="pkg" type="pkg"
packageID="com.box.boxtools.installer.boxedit"
downloadURL="https://box-installers.s3.amazonaws.com/boxedit/mac/currentrelease/BoxToolsInstaller.pkg" downloadURL="https://box-installers.s3.amazonaws.com/boxedit/mac/currentrelease/BoxToolsInstaller.pkg"
expectedTeamID="M683GB7CPW" expectedTeamID="M683GB7CPW"
;; ;;

View File

@@ -11,6 +11,7 @@ aircall
airserver airserver
airtame airtame
aldente aldente
alephone
alfred alfred
alttab alttab
amazonchime amazonchime
@@ -49,16 +50,19 @@ boxdrive
boxsync boxsync
boxtools boxtools
brave brave
bugdom
caffeine caffeine
cakebrew cakebrew
calibre calibre
camostudio camostudio
camtasia camtasia
canva canva
chatwork
cisdem-documentreader cisdem-documentreader
citrixworkspace citrixworkspace
clevershare2 clevershare2
clickshare clickshare
closeio
cloudya cloudya
code42 code42
coderunner coderunner
@@ -85,14 +89,17 @@ easeusdatarecoverywizard
egnyte egnyte
element element
eraseinstall eraseinstall
eshareosx
etrecheck etrecheck
evernote evernote
exelbanstats exelbanstats
exifrenamer exifrenamer
fantastical fantastical
fastscripts
favro favro
ferdi ferdi
figma figma
findanyfile
firefox firefox
firefox_da firefox_da
firefox_intl firefox_intl
@@ -149,6 +156,7 @@ jetbrainsintellijideace
jetbrainsphpstorm jetbrainsphpstorm
jetbrainspycharm jetbrainspycharm
jetbrainspycharmce jetbrainspycharmce
jetbrainsrubymine
jetbrainstoolbox jetbrainstoolbox
jetbrainswebstorm jetbrainswebstorm
karabinerelements karabinerelements
@@ -171,6 +179,9 @@ lulu
macfuse macfuse
macports macports
malwarebytes malwarebytes
marathon
marathon2
marathoninfinity
mattermost mattermost
menumeters menumeters
microsoftautoupdate microsoftautoupdate
@@ -197,6 +208,7 @@ microsoftword
microsoftyammer microsoftyammer
miro miro
montereyblocker montereyblocker
mowgliiitsycal
musescore musescore
muzzle muzzle
netnewswire netnewswire
@@ -204,6 +216,7 @@ nextcloud
nomad nomad
nomadlogin nomadlogin
notion notion
nudge
nvivo nvivo
obs obs
obsidian obsidian
@@ -221,6 +234,7 @@ onlyofficedesktop
openvpnconnect openvpnconnect
openvpnconnectv3 openvpnconnectv3
opera opera
ottomatic
pacifist pacifist
pandoc pandoc
parsec parsec
@@ -261,6 +275,7 @@ scaleft
screamingfrogseospider screamingfrogseospider
screencloudplayer screencloudplayer
screenflick screenflick
sequelpro
sfsymbols sfsymbols
shield shield
sidekick sidekick
@@ -285,6 +300,7 @@ spotify
steelseriesengine steelseriesengine
strongsync strongsync
sublimetext sublimetext
superhuman
supportapp supportapp
suspiciouspackage suspiciouspackage
swiftruntimeforcommandlinetools swiftruntimeforcommandlinetools
@@ -324,7 +340,7 @@ vivaldi
vlc vlc
vmwarehorizonclient vmwarehorizonclient
vscodium vscodium
wallyezflash wacomdrivers
webex webex
webexmeetings webexmeetings
webexteams webexteams
@@ -341,6 +357,7 @@ yubikeymanagerqt
zappy zappy
zeplin zeplin
zohoworkdrive zohoworkdrive
zohoworkdrivetruesync
zoom zoom
zoomclient zoomclient
zoomgov zoomgov

View File

@@ -372,11 +372,24 @@ Depending on the application or pkg there are a few more variables you can or ne
`$updateTool $updateArguments` `$updateTool $updateArguments`
Will be run instead of of downloading and installing a complete new version. Will be run instead of of downloading and installing a complete new version.
Use this when the `updateTool` does differential and optimized downloads. Use this when the `updateTool` does differential and optimized downloads.
e.g. `msupdate` (see microsoft installations) e.g. `msupdate` (see various Microsoft installations).
- `updateToolRunAsCurrentUser`: - `updateToolRunAsCurrentUser`:
When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and
- `CLIInstaller`:
- `CLIArguments`:
If the downloaded dmg is actually an installer that we can call using CLI, we can use these two variables for what to call.
We need to define `name` for the installed app (to be version checked), as well as `installerTool` for the installer app (if named differently that `name`. Installomator will add the path to the folder/disk image with the binary, and it will be called like this:
`$CLIInstaller $CLIArguments`
For most installations `CLIInstaller` should contain the `installerTool` for the CLI call (if its the same).
We can support a whole range of other software titles by implementing this.
See label adobecreativeclouddesktop.
- `installerTool`:
Introduced as part of `CLIInstaller`. If the installer in the DMG or ZIP is named differently than the installed app, then this variable can be used to name the installer that should be located after mounting/expanding the downloaded archive.
See label adobecreativeclouddesktop
### Configuration from Arguments ### Configuration from Arguments
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example: You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:

View File

@@ -0,0 +1,7 @@
mightymike)
name="Nanosaur"
type="dmg"
downloadURL=$(downloadURLFromGit jorio MightyMike)
appNewVersion=$(versionFromGit jorio MightyMike)
expectedTeamID="RVNL7XC27G"
;;

View File

@@ -0,0 +1,7 @@
nanosaur)
name="Nanosaur"
type="dmg"
downloadURL=$(downloadURLFromGit jorio Nanosaur)
appNewVersion=$(versionFromGit jorio Nanosaur)
expectedTeamID="RVNL7XC27G"
;;

View File

@@ -148,6 +148,7 @@ getAppVersion() {
appversion="$(pkgutil --pkg-info-plist ${packageID} 2>/dev/null | grep -A 1 pkg-version | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')" appversion="$(pkgutil --pkg-info-plist ${packageID} 2>/dev/null | grep -A 1 pkg-version | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')"
if [[ $appversion != "" ]]; then if [[ $appversion != "" ]]; then
printlog "found packageID $packageID installed, version $appversion" printlog "found packageID $packageID installed, version $appversion"
updateDetected="YES"
return return
else else
printlog "No version found using packageID $packageID" printlog "No version found using packageID $packageID"
@@ -162,7 +163,11 @@ getAppVersion() {
else else
applist=$(mdfind "kind:application $appName" -0 ) applist=$(mdfind "kind:application $appName" -0 )
fi fi
printlog "App(s) found: ${applist}" if [[ -z applist ]]; then
printlog "No previous app found"
else
printlog "App(s) found: ${applist}"
fi
appPathArray=( ${(0)applist} ) appPathArray=( ${(0)applist} )
@@ -173,6 +178,7 @@ getAppVersion() {
#appversion=$(mdls -name kMDItemVersion -raw $installedAppPath ) #appversion=$(mdls -name kMDItemVersion -raw $installedAppPath )
appversion=$(defaults read $installedAppPath/Contents/Info.plist $versionKey) #Not dependant on Spotlight indexing appversion=$(defaults read $installedAppPath/Contents/Info.plist $versionKey) #Not dependant on Spotlight indexing
printlog "found app at $installedAppPath, version $appversion" printlog "found app at $installedAppPath, version $appversion"
updateDetected="YES"
# Is current app from App Store # Is current app from App Store
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace." printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
@@ -342,7 +348,7 @@ installAppWithPath() { # $1: path to app to install in $targetDir
# versioncheck # versioncheck
# credit: Søren Theilgaard (@theilgaard) # credit: Søren Theilgaard (@theilgaard)
appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey) appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey)
if [[ $appversion == $appNewVersion ]]; then if [[ -n $appNewVersion && $appversion == $appNewVersion ]]; then
printlog "Downloaded version of $name is $appNewVersion, same as installed." printlog "Downloaded version of $name is $appNewVersion, same as installed."
if [[ $INSTALL != "force" ]]; then if [[ $INSTALL != "force" ]]; then
message="$name, version $appNewVersion, is the latest version." message="$name, version $appNewVersion, is the latest version."
@@ -370,6 +376,8 @@ installAppWithPath() { # $1: path to app to install in $targetDir
cleanupAndExit 6 "not running as root, exiting" cleanupAndExit 6 "not running as root, exiting"
fi fi
# Test if variable CLIInstaller is set
if [[ -z $CLIInstaller ]]; then
# remove existing application # remove existing application
if [ -e "$targetDir/$appName" ]; then if [ -e "$targetDir/$appName" ]; then
printlog "Removing existing $targetDir/$appName" printlog "Removing existing $targetDir/$appName"
@@ -382,7 +390,6 @@ installAppWithPath() { # $1: path to app to install in $targetDir
cleanupAndExit 7 "Error while copying" cleanupAndExit 7 "Error while copying"
fi fi
# set ownership to current user # set ownership to current user
if [ "$currentUser" != "loginwindow" ]; then if [ "$currentUser" != "loginwindow" ]; then
printlog "Changing owner to $currentUser" printlog "Changing owner to $currentUser"
@@ -391,6 +398,22 @@ installAppWithPath() { # $1: path to app to install in $targetDir
printlog "No user logged in, not changing user" printlog "No user logged in, not changing user"
fi fi
elif [[ ! -z $CLIInstaller ]]; then
mountname=$(dirname $appPath)
printlog "CLIInstaller exists, running installer command $mountname/$CLIInstaller $CLIArguments" #INFO
CLIoutput=$("$mountname/$CLIInstaller" "${CLIArguments[@]}" 2>&1)
CLIstatus=$(echo $?)
logoutput="$CLIoutput" # dedupliatelogs "$CLIoutput"
if [ $CLIstatus -ne 0 ] ; then
cleanupAndExit 3 "Error installing $mountname/$CLIInstaller $CLIArguments error:\n$logoutput" #ERROR
else
printlog "Succesfully ran $mountname/$CLIInstaller $CLIArguments"
fi
printlog "Debugging enabled, update tool output was:\n$logoutput" #DEBUG
fi
} }
mountDMG() { mountDMG() {
@@ -411,7 +434,6 @@ mountDMG() {
installFromDMG() { installFromDMG() {
mountDMG mountDMG
installAppWithPath "$dmgmount/$appName" installAppWithPath "$dmgmount/$appName"
} }
@@ -612,7 +634,11 @@ finishing() {
if [[ $currentUser != "loginwindow" && ( $NOTIFY == "success" || $NOTIFY == "all" ) ]]; then if [[ $currentUser != "loginwindow" && ( $NOTIFY == "success" || $NOTIFY == "all" ) ]]; then
printlog "notifying" printlog "notifying"
displaynotification "$message" "$name update/installation complete!" if [[ $updateDetected == "YES" ]]; then
displaynotification "$message" "$name update complete!"
else
displaynotification "$message" "$name installation complete!"
fi
fi fi
} }

View File

@@ -198,8 +198,27 @@ REOPEN="yes"
# $updateTool $updateArguments # $updateTool $updateArguments
# Will be run instead of of downloading and installing a complete new version. # Will be run instead of of downloading and installing a complete new version.
# Use this when the updateTool does differential and optimized downloads. # Use this when the updateTool does differential and optimized downloads.
# e.g. msupdate # e.g. msupdate on various Microsoft labels
# #
# - 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.
# #
# - CLIInstaller:
# - CLIArguments:
# If the downloaded dmg is actually an installer that we can call using CLI, we can
# use these two variables for what to call.
# We need to define `name` for the installed app (to be version checked), as well as
# `installerTool` for the installer app (if named differently that `name`. Installomator
# will add the path to the folder/disk image with the binary, and it will be called like this:
`$CLIInstaller $CLIArguments`
# For most installations `CLIInstaller` should contain the `installerTool` for the CLI call
# (if its the same).
# We can support a whole range of other software titles by implementing this.
# See label adobecreativeclouddesktop
#
# - installerTool:
# Introduced as part of `CLIInstaller`. If the installer in the DMG or ZIP is named
# differently than the installed app, then this variable can be used to name the
# installer that should be located after mounting/expanding the downloaded archive.
# See label adobecreativeclouddesktop
#

View File

@@ -0,0 +1,17 @@
adobecreativeclouddesktop)
name="Adobe Creative Cloud"
#appName="Install.app"
type="dmg"
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)
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)
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)
installerTool="Install.app"
CLIInstaller="Install.app/Contents/MacOS/Install"
CLIArguments=(--mode=silent)
expectedTeamID="JQ525L2MZD"
Company="Adobe"
;;

View File

@@ -0,0 +1,7 @@
alephone)
name="Aleph One"
type="dmg"
downloadURL=$(downloadURLFromGit Aleph-One-Marathon alephone)
appNewVersion=$(versionFromGit Aleph-One-Marathon alephone)
expectedTeamID="E8K89CXZE7"
;;

View File

@@ -1,8 +1,7 @@
audacity) audacity)
# credit: Gabe Marchan (gabemarchan.com - @darklink87)
name="Audacity" name="Audacity"
type="dmg" type="dmg"
downloadURL=$(downloadURLFromGit audacity audacity) downloadURL=$(downloadURLFromGit audacity audacity)
appNewVersion=$(versionFromGit audacity audacity) appNewVersion=$(versionFromGit audacity audacity)
expectedTeamID="T3N4JQ7YY6" expectedTeamID="AWEYX923UX"
;; ;;

View File

@@ -0,0 +1,7 @@
bugdom)
name="Bugdom"
type="dmg"
downloadURL=$(downloadURLFromGit jorio Bugdom)
appNewVersion=$(versionFromGit jorio Bugdom)
expectedTeamID="RVNL7XC27G"
;;

View File

@@ -0,0 +1,6 @@
chatwork)
name="Chatwork"
type="dmg"
downloadURL="https://desktop-app.chatwork.com/installer/Chatwork.dmg"
expectedTeamID="H34A3H2Y54"
;;

View File

@@ -0,0 +1,7 @@
fastscripts)
name="FastScripts"
type="zip"
downloadURL=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '//rss/channel/item/enclosure/@url' 2>/dev/null | cut -d '"' -f2 )
appNewVersion=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '//rss/channel/item/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f2 )
expectedTeamID="493CVA9A35"
;;

View File

@@ -0,0 +1,7 @@
findanyfile)
name="Find Any File"
type="zip"
downloadURL=$(curl -fs "https://findanyfile.app/appcast2.php" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2)
appNewVersion=$(curl -fs "https://findanyfile.app/appcast2.php" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2)
expectedTeamID="25856V4B4X"
;;

View File

@@ -1,7 +1,8 @@
jabradirect) jabradirect)
name="Jabra Direct" name="Jabra Direct"
type="pkgInDmg" type="pkgInDmg"
packageID="com.jabra.directonline"
downloadURL="https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/JabraDirectSetup.dmg" downloadURL="https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/JabraDirectSetup.dmg"
appNewVersion=$(curl -fs https://www.jabra.com/Support/release-notes/release-note-jabra-direct | grep -oe "Release version:.*[0-9.]*<" | head -1 | cut -d ">" -f2 | cut -d "<" -f1 | sed 's/ //g')
expectedTeamID="55LV32M29R" expectedTeamID="55LV32M29R"
appNewVersion=$(curl -fs https://www.jabra.com/Support/release-notes/release-note-jabra-direct | grep -o "Jabra Direct macOS:*.*<" | head -1 | cut -d ":" -f2 | cut -d " " -f2 | cut -d "<" -f1)
;; ;;

View File

@@ -0,0 +1,13 @@
jetbrainsrubymine)
name="RubyMine"
type="dmg"
jetbrainscode="RM"
if [[ $(arch) == i386 ]]; then
jetbrainsdistribution="mac"
elif [[ $(arch) == arm64 ]]; then
jetbrainsdistribution="macM1"
fi
downloadURL="https://download.jetbrains.com/product?code=${jetbrainscode}&latest&distribution=${jetbrainsdistribution}"
appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "location" | tail -1 | sed -E 's/.*\/[a-zA-Z-]*-([0-9.]*).*[-.].*dmg/\1/g' )
expectedTeamID="2ZEFAR8TH3"
;;

View File

@@ -0,0 +1,13 @@
logseq)
name="Logseq"
type="dmg"
if [[ $(arch) == "arm64" ]]; then
archiveName="darwin-arm64-[0-9.]*.dmg"
downloadURL=$(downloadURLFromGit logseq logseq)
elif [[ $(arch) == "i386" ]]; then
archiveName="darwin-x64-[0-9.]*.dmg"
downloadURL=$(downloadURLFromGit logseq logseq)
fi
appNewVersion=$(versionFromGit logseq logseq)
expectedTeamID="3K44EUN829"
;;

View File

@@ -0,0 +1,7 @@
maccyapp)
name="Maccy"
type="zip"
downloadURL="$(downloadURLFromGit p0deje Maccy)"
appNewVersion="$(versionFromGit p0deje Maccy)"
expectedTeamID="MN3X4648SC"
;;

View File

@@ -0,0 +1,8 @@
marathon)
name="Marathon"
type="dmg"
archiveName="Marathon-[0-9.]*-Mac.dmg"
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
expectedTeamID="E8K89CXZE7"
;;

View File

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

View File

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

View File

@@ -1,12 +1,9 @@
mattermost) mattermost)
name="Mattermost" name="Mattermost"
type="dmg" type="dmg"
if [[ $(arch) == i386 ]]; then archiveName="mac-universal.dmg"
archiveName="mac-x64.dmg"
elif [[ $(arch) == arm64 ]]; then
archiveName="mac-m1.dmg"
fi
downloadURL=$(downloadURLFromGit mattermost desktop) downloadURL=$(downloadURLFromGit mattermost desktop)
appNewVersion=$(versionFromGit mattermost desktop ) appNewVersion=$(versionFromGit mattermost desktop )
expectedTeamID="UQ8HT4Q2XM" expectedTeamID="UQ8HT4Q2XM"
Mattermost Helper (Renderer).app app.asar
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftcompanyportal)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps IMCP01 ) updateToolArguments=( --install --apps IMCP01 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftdefenderatp)
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/') 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 # No version number in download url
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps WDAV00 ) updateToolArguments=( --install --apps WDAV00 )
;; ;;

View File

@@ -1,11 +1,16 @@
microsoftedge|\ microsoftedge|\
microsoftedgeconsumerstable) microsoftedgeconsumerstable|\
microsoftedgeenterprisestable)
name="Microsoft Edge" name="Microsoft Edge"
type="pkg" type="pkg"
downloadURL="https://go.microsoft.com/fwlink/?linkid=2069148" downloadURL="https://go.microsoft.com/fwlink/?linkid=2093504"
#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 -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') appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps EDGE01 ) updateToolArguments=( --install --apps EDGE01 )
;; ;;

View File

@@ -1,10 +0,0 @@
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 --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps EDGE01 )
;;

View File

@@ -5,6 +5,10 @@ microsoftexcel)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps XCEL2019 ) updateToolArguments=( --install --apps XCEL2019 )
;; ;;

View File

@@ -7,7 +7,11 @@ microsoftoffice365)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
# using MS PowerPoint as the 'stand-in' for the entire suite # using MS PowerPoint as the 'stand-in' for the entire suite
#appName="Microsoft PowerPoint.app" #appName="Microsoft PowerPoint.app"
if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" ) 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 --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install ) updateToolArguments=( --install )
;; ;;

View File

@@ -6,7 +6,11 @@ microsoftofficebusinesspro)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
# using MS PowerPoint as the 'stand-in' for the entire suite # using MS PowerPoint as the 'stand-in' for the entire suite
appName="Microsoft PowerPoint.app" appName="Microsoft PowerPoint.app"
if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
blockingProcesses=( "Microsoft AutoUpdate" "Microsoft Word" "Microsoft PowerPoint" "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "OneDrive" "Teams") 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 --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install ) updateToolArguments=( --install )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftonedrive)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps ONDR18 ) updateToolArguments=( --install --apps ONDR18 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftonenote)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps ONMC2019 ) updateToolArguments=( --install --apps ONMC2019 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftoutlook)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps OPIM2019 ) updateToolArguments=( --install --apps OPIM2019 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftpowerpoint)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps PPT32019 ) updateToolArguments=( --install --apps PPT32019 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftremotedesktop)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps MSRD10 ) updateToolArguments=( --install --apps MSRD10 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftskypeforbusiness)
#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 -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') appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps MSFB16 ) updateToolArguments=( --install --apps MSFB16 )
;; ;;

View File

@@ -5,6 +5,10 @@ microsoftword)
#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 -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) appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
expectedTeamID="UBF8T346G9" expectedTeamID="UBF8T346G9"
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate --list; /Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" ]]; then
printlog "Running msupdate --list"
"/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" --list
fi
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install --apps MSWD2019 ) updateToolArguments=( --install --apps MSWD2019 )
;; ;;

View File

@@ -0,0 +1,8 @@
mowgliiitsycal)
name="Itsycal"
type="zip"
downloadURL=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
appNewVersion=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal.xml | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
expectedTeamID="HFT3T55WND"
;;

View File

@@ -0,0 +1,8 @@
nudge)
name="Nudge"
type="pkg"
downloadURL=$(downloadURLFromGit macadmins Nudge )
appNewVersion=$(versionFromGit macadmins Nudge )
expectedTeamID="9GQZ7KUFR6"
archiveName="Nudge-[0-9.]*.pkg"
;;

View File

@@ -0,0 +1,8 @@
ottomatic)
name="Otto Matic"
type="dmg"
downloadURL=$(downloadURLFromGit jorio OttoMatic)
appNewVersion=$(versionFromGit jorio OttoMatic)
expectedTeamID="RVNL7XC27G"
;;

View File

@@ -0,0 +1,8 @@
overflow)
name="Overflow"
type="dmg"
downloadURL="$(curl -sL 'https://overflow.io/download/' | awk -F '"' '/app-updates.overflow.io\/packages\/updates\/osx_64/ { print $8; exit }')"
appNewVersion=$(echo "$downloadURL" | awk -F '-|[.]dmg' '{ print $(NF-1) }')
expectedTeamID="7TK7YSGJFF"
versionKey="CFBundleShortVersionString"
;;

View File

@@ -1,8 +1,7 @@
r) r)
# credit: Tadayuki Onishi (@kenchan0130)
name="R" name="R"
type="pkg" type="pkg"
downloadURL=$( curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p' ) downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '<a href=".*pkg">' | sed -E 's/.+"(.+)".+/\1/g' )"
appNewVersion=$(curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p') appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="VZLD955F6P" expectedTeamID="VZLD955F6P"
;; ;;

View File

@@ -0,0 +1,7 @@
sequelpro)
name="Sequel Pro"
type="dmg"
downloadURL="$(downloadURLFromGit sequelpro sequelpro)"
appNewVersion="$(versionFromGit sequelpro sequelpro)"
expectedTeamID="Media"
;;

View File

@@ -1,7 +1,11 @@
smartgit) smartgit)
name="SmartGit" name="SmartGit"
type="dmg" type="dmg"
downloadURL="https://www.syntevo.com$(curl -fs "https://www.syntevo.com/smartgit/download/" | grep -i -o -E "/downloads/.*/smartgit.*\.dmg")" if [[ $(arch) == "arm64" ]]; then
downloadURL="https://www.syntevo.com$(curl -fs "https://www.syntevo.com/smartgit/download/" | grep -i -o -E "/downloads/.*/smartgit.*\.dmg" | tail -1)"
elif [[ $(arch) == "i386" ]]; then
downloadURL="https://www.syntevo.com$(curl -fs "https://www.syntevo.com/smartgit/download/" | grep -i -o -E "/downloads/.*/smartgit.*\.dmg" | head -1)"
fi
appNewVersion="$(curl -fs "https://www.syntevo.com/smartgit/changelog.txt" | grep -i -E "SmartGit *[0-9.]* *.*" | head -1 | awk '{print $2}')" appNewVersion="$(curl -fs "https://www.syntevo.com/smartgit/changelog.txt" | grep -i -E "SmartGit *[0-9.]* *.*" | head -1 | awk '{print $2}')"
expectedTeamID="PHMY45PTNW" expectedTeamID="PHMY45PTNW"
;; ;;

View File

@@ -0,0 +1,11 @@
superhuman)
name="superhuman"
type="dmg"
if [[ $(arch) == "arm64" ]]; then
downloadURL="https://download.superhuman.com/Superhuman-arm64.dmg"
elif [[ $(arch) == "i386" ]]; then
downloadURL="https://download.superhuman.com/Superhuman.dmg"
fi
appNewVersion=$(curl -fs "https://storage.googleapis.com/download.superhuman.com/supertron-update/latest-mac.yml" | head -1 | cut -d " " -f2)
expectedTeamID="6XHFYUTQGX"
;;

View File

@@ -0,0 +1,7 @@
talkdeskcallbar)
name="Callbar"
type="dmg"
downloadURL=https://downloadcallbar.talkdesk.com/Callbar-$(curl -fsL https://downloadcallbar.talkdesk.com/release_metadata.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p').dmg
appNewVersion=$(curl -fsL https://downloadcallbar.talkdesk.com/release_metadata.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p')
expectedTeamID="YGGJX44TB8"
;;

View File

@@ -117,6 +117,10 @@ printlog "appversion: $appversion"
# MARK: Exit if new version is the same as installed version (appNewVersion specified) # MARK: Exit if new version is the same as installed version (appNewVersion specified)
# credit: Søren Theilgaard (@theilgaard) # credit: Søren Theilgaard (@theilgaard)
if [[ $INSTALL == "force" ]]; then
printlog "Using force to install, so not using updateTool."
updateTool=""
fi
if [[ -n $appNewVersion ]]; then if [[ -n $appNewVersion ]]; then
printlog "Latest version of $name is $appNewVersion" printlog "Latest version of $name is $appNewVersion"
if [[ $appversion == $appNewVersion ]]; then if [[ $appversion == $appNewVersion ]]; then
@@ -129,9 +133,6 @@ if [[ -n $appNewVersion ]]; then
displaynotification "$message" "No update for $name!" displaynotification "$message" "No update for $name!"
fi fi
cleanupAndExit 0 "No newer version." cleanupAndExit 0 "No newer version."
else
printlog "Using force to install anyway. Not using updateTool."
updateTool=""
fi fi
else else
printlog "DEBUG mode enabled, not exiting, but there is no new version of app." printlog "DEBUG mode enabled, not exiting, but there is no new version of app."
@@ -139,10 +140,6 @@ if [[ -n $appNewVersion ]]; then
fi fi
else else
printlog "Latest version not specified." printlog "Latest version not specified."
if [[ $INSTALL == "force" ]]; then
printlog "Using force to install, so not using updateTool."
updateTool=""
fi
fi fi
# MARK: check if this is an Update and we can use updateTool # MARK: check if this is an Update and we can use updateTool
@@ -169,14 +166,22 @@ else
printlog "Downloading $downloadURL to $archiveName" printlog "Downloading $downloadURL to $archiveName"
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying" printlog "notifying"
displaynotification "Downloading $name update" "Download in progress …" if [[ $updateDetected == "YES" ]]; then
displaynotification "Downloading $name update" "Download in progress …"
else
displaynotification "Downloading new $name" "Download in progress …"
fi
fi fi
if ! curl --location --fail --silent "$downloadURL" -o "$archiveName"; then if ! curl --location --fail --silent "$downloadURL" -o "$archiveName"; then
printlog "error downloading $downloadURL" printlog "error downloading $downloadURL"
message="$name update/installation failed. This will be logged, so IT can follow up." message="$name update/installation failed. This will be logged, so IT can follow up."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying" printlog "notifying"
displaynotification "$message" "Error installing/updating $name" if [[ $updateDetected == "YES" ]]; then
displaynotification "$message" "Error updating $name"
else
displaynotification "$message" "Error installing $name"
fi
fi fi
cleanupAndExit 2 cleanupAndExit 2
fi fi
@@ -199,7 +204,17 @@ fi
printlog "Installing $name" printlog "Installing $name"
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying" printlog "notifying"
displaynotification "Installing $name" "Installation in progress …" if [[ $updateDetected == "YES" ]]; then
displaynotification "Updating $name" "Installation in progress …"
else
displaynotification "Installing $name" "Installation in progress …"
fi
fi
if [ -n "$installerTool" ]; then
# installerTool defined, and we use that for installation
printlog "installerTool used: $installerTool"
appName="$installerTool"
fi fi
case $type in case $type in

View File

@@ -61,9 +61,9 @@ versionFromGit() {
pkgInvestigation() { pkgInvestigation() {
echo "Package investigation." echo "Package investigation."
teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ) teamID=$(spctl -a -vv -t install "$pkgPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
if [[ -z $teamID ]]; then if [[ -z $teamID ]]; then
echo "Error verifying PKG: $archiveName" echo "Error verifying PKG: $pkgPath"
echo "No TeamID found." echo "No TeamID found."
exit 4 exit 4
fi fi