diff --git a/CHANGELOG.md b/CHANGELOG.md
index 099342b..5f87508 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,16 @@
-- Improved DEBUG handling with two different modes. `DEBUG=0` is still for production, and `1` is still for the DEBUG we previously knew downloading to the directory it is running from, but `2` will download to temporary folder, will detect updates, but will not install anything, but it will notify the user.
+## v9?
+
+- We have moved the root check to the beginning of the script, and improved DEBUG handling with two different modes. `DEBUG=0` is still for production, and `1` is still for the DEBUG we previously knew downloading to the directory it is running from, but `2` will download to temporary folder, will detect updates, but will not install anything, but it will notify the user (almost as running the script without root before).
+
+## v8.0
+
+- removed leading `0` from the version because it has lost all meaning (thanks to @grahampugh for the inspiration)
+- 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 installed using CLI: `CLIInstaller` and `CLIArguments`. When the installer app is named differently than the installed app, then the variable `installerTool` should be used 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”.
+- 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 useful.
+- 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. This should help with the Jamf agent stalling during installation.
+- Added bunch of new labels, and improved others.
## v0.7
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fa9110a..f725b46 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,22 +1,30 @@
# Contributing to Installomator
-__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the fragmented files, not the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten.__
+__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the files below `fragments`-folder. DO NOT edit the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten.__
We try to keep the script as short as possible, and with more than 300 labels, we can save 300 lines in the script, if we do not have credit lines on each of these. So we are thankful for your contribution, but we will be removing these lines in the coming releases.
## Labels
-If you need a new label, please take a look at the tutorials in the Wiki, if those can be helpful for starting out on the creation of the label.
+If you need a new label for a piece of software, please take a look at the tutorials in the Wiki, if those can be helpful for starting out on the creation of the label.
-We really encourage you to try out finding the version of the app online, so that `appNewVersion` can be filled in the label. It helps a lot when the software needs update, and greatly improve user experience.
+We expect you to try out finding the __version__ of the software online, so that `appNewVersion` can be filled in the label. It helps a lot when the software needs update, and greatly improve user experience.
+
+Please document what you found out about the __version__ of the software if it's not included. We will not accept a new label if this is not documented, we will ask about this if it was not included. This is very important for the quality and reliability of Installomator.
When creating a new label, please file a pull request (PR). And feel free to ask questions or make your comments about what else is needed, if we should take a look at the label, or help out in finding the version or isolating URLs or anything else.
-Please include the log of installing this label in the description.
+Please include the log of installing this label in the description, like this:
+```
+% /Users/st/Documents/GitHub/Installomator/utils/assemble.sh software
+2021-11-24 10:07:19 software ################## Start Installomator v. 0.8.0
+2021-11-24 10:07:19 software ################## software
+2021-11-24 10:07:19 software DEBUG mode 1 enabled.
+```
Please have one label per PR, so we can separate these. Also if you change/fix a label.
-Thank you very much!
+Thank you very much for your contribution!
## Issues
diff --git a/Installomator.sh b/Installomator.sh
index 1a82401..81b56c7 100755
--- a/Installomator.sh
+++ b/Installomator.sh
@@ -164,6 +164,8 @@ REOPEN="yes"
# - archiveName: (optional)
# The name of the downloaded file.
# When not given the archiveName is derived from the $name.
+# Note: This has to be defined BEFORE calling downloadURLFromGit or
+# versionFromGit functions in the label.
#
# - appName: (optional)
# File name of the app bundle in the dmg to verify and copy (include .app).
@@ -196,13 +198,32 @@ REOPEN="yes"
# $updateTool $updateArguments
# Will be run instead of of downloading and installing a complete new version.
# Use this when the updateTool does differential and optimized downloads.
-# e.g. msupdate
+# e.g. msupdate on various Microsoft labels
#
# - updateToolRunAsCurrentUser:
# When this variable is set (any value), $updateTool will be run as the current user.
#
-VERSION="0.7.0"
-VERSIONDATE="2021-10-14"
+# - 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 it’s 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
+#
+VERSION="9.0dev"
+VERSIONDATE="2021-11-23"
# MARK: Functions
@@ -354,6 +375,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')"
if [[ $appversion != "" ]]; then
printlog "found packageID $packageID installed, version $appversion"
+ updateDetected="YES"
return
else
printlog "No version found using packageID $packageID"
@@ -368,7 +390,11 @@ getAppVersion() {
else
applist=$(mdfind "kind:application $appName" -0 )
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} )
@@ -379,6 +405,7 @@ getAppVersion() {
#appversion=$(mdls -name kMDItemVersion -raw $installedAppPath )
appversion=$(defaults read $installedAppPath/Contents/Info.plist $versionKey) #Not dependant on Spotlight indexing
printlog "found app at $installedAppPath, version $appversion"
+ updateDetected="YES"
# Is current app from App Store
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
@@ -548,10 +575,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir
# versioncheck
# credit: Søren Theilgaard (@theilgaard)
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."
if [[ $INSTALL != "force" ]]; then
- message="$name, version $appNewVersion, is the latest version."
+ message="$name, version $appNewVersion, is the latest version."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying"
displaynotification "$message" "No update for $name!"
@@ -575,26 +602,44 @@ installAppWithPath() { # $1: path to app to install in $targetDir
# not running as root
cleanupAndExit 6 "not running as root, exiting"
fi
+
+ # Test if variable CLIInstaller is set
+ if [[ -z $CLIInstaller ]]; then
+
+ # remove existing application
+ if [ -e "$targetDir/$appName" ]; then
+ printlog "Removing existing $targetDir/$appName"
+ rm -Rf "$targetDir/$appName"
+ fi
- # remove existing application
- if [ -e "$targetDir/$appName" ]; then
- printlog "Removing existing $targetDir/$appName"
- rm -Rf "$targetDir/$appName"
- fi
+ # copy app to /Applications
+ printlog "Copy $appPath to $targetDir"
+ if ! ditto "$appPath" "$targetDir/$appName"; then
+ cleanupAndExit 7 "Error while copying"
+ fi
- # copy app to /Applications
- printlog "Copy $appPath to $targetDir"
- if ! ditto "$appPath" "$targetDir/$appName"; then
- cleanupAndExit 7 "Error while copying"
- fi
+ # set ownership to current user
+ if [ "$currentUser" != "loginwindow" ]; then
+ printlog "Changing owner to $currentUser"
+ chown -R "$currentUser" "$targetDir/$appName"
+ else
+ printlog "No user logged in, not changing user"
+ fi
+ elif [[ ! -z $CLIInstaller ]]; then
+ mountname=$(dirname $appPath)
+ printlog "CLIInstaller exists, running installer command $mountname/$CLIInstaller $CLIArguments" #INFO
- # set ownership to current user
- if [ "$currentUser" != "loginwindow" ]; then
- printlog "Changing owner to $currentUser"
- chown -R "$currentUser" "$targetDir/$appName"
- else
- printlog "No user logged in, not changing user"
+ 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
}
@@ -617,7 +662,6 @@ mountDMG() {
installFromDMG() {
mountDMG
-
installAppWithPath "$dmgmount/$appName"
}
@@ -656,7 +700,7 @@ installFromPKG() {
if [[ $appversion == $appNewVersion ]]; then
printlog "Downloaded version of $name is the same as installed."
if [[ $INSTALL != "force" ]]; then
- message="$name, version $appNewVersion, is the latest version."
+ message="$name, version $appNewVersion, is the latest version."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying"
displaynotification "$message" "No update for $name!"
@@ -804,7 +848,7 @@ runUpdateTool() {
}
finishing() {
- printlog "Finishing…"
+ printlog "Finishing..."
sleep 10 # wait a moment to let spotlight catch up
getAppVersion
@@ -818,7 +862,11 @@ finishing() {
if [[ $currentUser != "loginwindow" && ( $NOTIFY == "success" || $NOTIFY == "all" ) ]]; then
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
}
@@ -861,9 +909,20 @@ done
# lowercase the label
label=${label:l}
+# separate check for 'version' in order to print plain version number without any other information
+if [[ $label == "version" ]]; then
+ echo "$VERSION"
+ exit 0
+fi
+
printlog "################## Start Installomator v. $VERSION"
printlog "################## $label"
+# Check for DEBUG mode
+if [[ $DEBUG -gt 0 ]]; then
+ printlog "DEBUG mode $DEBUG enabled."
+fi
+
# How we get version number from app
# (alternative is "CFBundleVersion", that can be used in labels)
versionKey="CFBundleShortVersionString"
@@ -874,11 +933,6 @@ currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print
# MARK: labels in case statement
case $label in
-version)
- # print the script VERSION
- printlog "$VERSION"
- exit 0
- ;;
longversion)
# print the script version
printlog "Installomater: version $VERSION ($VERSIONDATE)"
@@ -954,6 +1008,23 @@ 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')
expectedTeamID="JQ525L2MZD"
;;
+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"
+ ;;
adobereaderdc-update)
name="Adobe Acrobat Reader DC"
type="pkgInDmg"
@@ -986,7 +1057,7 @@ airserver)
name="AirServer"
type="dmg"
downloadURL="https://www.airserver.com/download/mac/latest"
- #appNewVersion=$() # Cannot find version history or release notes on home page
+ appNewVersion=$(curl -fsIL "${downloadURL}" | grep -i "location" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="6C755KS5W3"
;;
airtame)
@@ -1003,6 +1074,13 @@ aldente)
appNewVersion=$(versionFromGit davidwernhart AlDente)
expectedTeamID="3WVC84GB99"
;;
+alephone)
+ name="Aleph One"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit Aleph-One-Marathon alephone)
+ appNewVersion=$(versionFromGit Aleph-One-Marathon alephone)
+ expectedTeamID="E8K89CXZE7"
+ ;;
alfred)
# credit: AP Orlebeke (@apizz)
name="Alfred"
@@ -1053,6 +1131,7 @@ apparency)
name="Apparency"
type="dmg"
downloadURL="https://www.mothersruin.com/software/downloads/Apparency.dmg"
+ appNewVersion=$(curl -fs https://mothersruin.com/software/Apparency/data/ApparencyVersionInfo.plist | grep -A1 CFBundleShortVersionString | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')
expectedTeamID="936EB786NH"
;;
appcleaner)
@@ -1094,7 +1173,8 @@ applesfsymbols|\
sfsymbols)
name="SF Symbols"
type="pkgInDmg"
- downloadURL="https://developer.apple.com/design/downloads/SF-Symbols.dmg"
+ downloadURL=$( curl -fs "https://developer.apple.com/sf-symbols/" | grep -oe "https.*\.dmg" | head -1 )
+ appNewVersion=$( echo "$downloadURL" | head -1 | sed -E 's/.*SF-Symbols-([0-9.]*)\..*/\1/g')
expectedTeamID="Software Update"
;;
aquaskk)
@@ -1136,12 +1216,11 @@ atom)
expectedTeamID="VEKTX9H2N7"
;;
audacity)
- # credit: Gabe Marchan (gabemarchan.com - @darklink87)
name="Audacity"
type="dmg"
downloadURL=$(downloadURLFromGit audacity audacity)
appNewVersion=$(versionFromGit audacity audacity)
- expectedTeamID="T3N4JQ7YY6"
+ expectedTeamID="AWEYX923UX"
;;
authydesktop)
name="Authy Desktop"
@@ -1252,7 +1331,7 @@ bluejeans)
name="BlueJeans"
type="pkg"
if [[ $(arch) == "arm64" ]]; then
- downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeansInstaller.*arm.*.pkg" )
+ downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeans.*Installer.*arm.*.pkg" )
elif [[ $(arch) == "i386" ]]; then
downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeansInstaller.*x86.*.dmg" | sed 's/dmg/pkg/g')
fi
@@ -1298,6 +1377,13 @@ brave)
appNewVersion=$(curl --location --fail --silent "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2)
expectedTeamID="KL8N8XSYF4"
;;
+bugdom)
+ name="Bugdom"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit jorio Bugdom)
+ appNewVersion=$(versionFromGit jorio Bugdom)
+ expectedTeamID="RVNL7XC27G"
+ ;;
caffeine)
name="Caffeine"
type="dmg"
@@ -1326,11 +1412,12 @@ calibre)
expectedTeamID="NTY7FVCEKP"
;;
camostudio)
- # credit: Søren Theilgaard (@theilgaard)
name="Camo Studio"
type="zip"
downloadURL="https://reincubate.com/res/labs/camo/camo-macos-latest.zip"
- appNewVersion=$(curl -s -L https://reincubate.com/support/camo/release-notes/ | grep -m2 "has-m-t-0" | head -1 | cut -d ">" -f2 | cut -d " " -f1)
+ #appNewVersion=$(curl -s -L https://reincubate.com/support/camo/release-notes/ | grep -m2 "has-m-t-0" | head -1 | cut -d ">" -f2 | cut -d " " -f1)
+ appNewVersion=$( curl -fs "https://uds.reincubate.com/release-notes/camo/" | head -1 | cut -d "," -f3 | grep -o -e "[0-9.]*" )
+ # Camo Studio will ask for admin permissions to install som plug-ins. that has not been handled.
expectedTeamID="Q248YREB53"
;;
camtasia)
@@ -1339,6 +1426,23 @@ camtasia)
downloadURL=https://download.techsmith.com/camtasiamac/releases/Camtasia.dmg
expectedTeamID="7TQL462TU8"
;;
+canva)
+ name="Canva"
+ type="dmg"
+ if [[ $(arch) == "arm64" ]]; then
+ downloadURL=$(curl -fsLI -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "accept-encoding: gzip, deflate, br" -H "accept-language: en-US,en;q=0.9" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "sec-fetch-mode: navigate" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" "https://www.canva.com/download/mac/arm/canva-desktop/" | grep -i "^location" | cut -d " " -f2 | tr -d '\r')
+ elif [[ $(arch) == "i386" ]]; then
+ downloadURL=$(curl -fsLI -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" -H "accept-encoding: gzip, deflate, br" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "accept-language: en-US,en;q=0.9" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-mode: navigate" "https://www.canva.com/download/mac/intel/canva-desktop/" | grep -i "^location" | cut -d " " -f2 | tr -d '\r')
+ fi
+ appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' )
+ expectedTeamID="5HD2ARTBFS"
+ ;;
+chatwork)
+ name="Chatwork"
+ type="dmg"
+ downloadURL="https://desktop-app.chatwork.com/installer/Chatwork.dmg"
+ expectedTeamID="H34A3H2Y54"
+ ;;
cisdem-documentreader)
name="cisdem-documentreader"
type="dmg"
@@ -1368,6 +1472,13 @@ clickshare)
downloadURL=https://www.barco.com$(curl -fs "https://www.barco.com/en/clickshare/app" | grep -E -o '(\/\S*Download\?FileNumber=R3306192\S*ShowDownloadPage=False)' | tail -1)
expectedTeamID="P6CDJZR997"
;;
+closeio)
+ name="Close.io"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit closeio closeio-desktop-releases)
+ appNewVersion=$(versionFromGit closeio closeio-desktop-releases)
+ expectedTeamID="WTNQ6773UC"
+ ;;
cloudya)
name="Cloudya"
type="appInDmgInZip"
@@ -1499,11 +1610,12 @@ devonthink)
dialog)
name="Dialog"
type="pkg"
- downloadURL=$(downloadURLFromGit bartreardon Dialog-public )
- appNewVersion=$(versionFromGit bartreardon Dialog-public )
+ packageID="au.csiro.dialogcli"
+ downloadURL="$(downloadURLFromGit bartreardon Dialog)"
+ appNewVersion="$(versionFromGit bartreardon Dialog)"
expectedTeamID="PWA5E9TQ59"
;;
- dialpad)
+dialpad)
# credit: @ehosaka
name="Dialpad"
type="dmg"
@@ -1571,6 +1683,15 @@ eraseinstall)
downloadURL=https://bitbucket.org$(curl -fs https://bitbucket.org/prowarehouse-nl/erase-install/downloads/ | grep pkg | cut -d'"' -f2 | head -n 1)
expectedTeamID="R55HK5K86Y"
;;
+eshareosx)
+ name="e-Share"
+ type="pkg"
+ packageID="com.ncryptedcloud.e-Share.pkg"
+ downloadURL=https://www.ncryptedcloud.com/static/downloads/osx/$(curl -fs https://www.ncryptedcloud.com/static/downloads/osx/ | grep -o -i "href.*\".*\"" | cut -d '"' -f2)
+ versionKey="CFBundleVersion"
+ appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z\-]*_([0-9.]*)\.pkg/\1/g' )
+ expectedTeamID="X9MBQS7DDC"
+ ;;
etrecheck)
# credit: @dvsjr macadmins slack
name="EtreCheckPro"
@@ -1594,6 +1715,13 @@ exelbanstats)
appNewVersion=$(versionFromGit exelban stats)
expectedTeamID="RP2S87B72W"
;;
+exifrenamer)
+ name="ExifRenamer"
+ type="dmg"
+ downloadURL="https://www.qdev.de/"$(curl -fs "https://www.qdev.de/download.php?file=ExifRenamer.dmg" | grep -o -e "URL=[a-zA-Z/]*.dmg" | cut -d "=" -f2)
+ appNewVersion=$(curl -fs "https://www.qdev.de/?location=downloads" | grep -A1 -m1 "ExifRenamer" | tail -1 | cut -d ">" -f2 | cut -d " " -f1)
+ expectedTeamID="MLF9FE35AM"
+ ;;
fantastical)
# credit: Drew Diver (@grumpydrew on MacAdmins Slack)
name="Fantastical"
@@ -1602,6 +1730,13 @@ fantastical)
appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | awk '{print $2}' | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)\..*/\1/g' )
expectedTeamID="85C27NK92C"
;;
+fastscripts)
+ name="FastScripts"
+ type="zip"
+ downloadURL=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2 )
+ appNewVersion=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2 )
+ expectedTeamID="493CVA9A35"
+ ;;
favro)
name="Favro"
type="dmg"
@@ -1633,11 +1768,18 @@ figma)
appNewVersion="$(curl -fsL https://desktop.figma.com/mac/RELEASE.json | awk -F '"' '{ print $8 }')"
expectedTeamID="T8RA8NE3B7"
;;
+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"
+ ;;
firefox)
name="Firefox"
type="dmg"
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
- appNewVersion=$(/usr/bin/curl https://www.mozilla.org/en-US/firefox/releases/ --silent | /usr/bin/grep 'Inkscape" | cut -d '>' -f 3 | cut -d '<' -f 1 | sed 's/[^0-9.]*//g') # Can't figure out where exact new version is found. Currently returns 1.0, but version is "1.0.0 (4035a4f)"
+ downloadURL="https://inkscape.org$(curl -fs https://inkscape.org$(curl -fsJL https://inkscape.org/release/ | grep "/release/" | grep en | head -n 1 | cut -d '"' -f 6)mac-os-x/dmg/dl/ | grep "click here" | cut -d '"' -f 2)"
+ appCustomVersion() { /Applications/Inkscape.app/Contents/MacOS/inkscape --version | cut -d " " -f2 }
+ appNewVersion=$(curl -fsJL https://inkscape.org/release/ | grep "
" | grep -o -e "[0-9.]*")
expectedTeamID="SW3D6BB6A6"
;;
insomnia)
@@ -1959,15 +2102,14 @@ insomnia)
appNewVersion=$(versionFromGit kong insomnia)
expectedTeamID="FX44YY62GV"
;;
+installomator|\
installomator_theile)
- # credit: Søren Theilgaard (@theilgaard)
name="Installomator"
type="pkg"
- packageID="dk.theilgaard.pkg.Installomator"
- downloadURL=$(downloadURLFromGit theile Installomator )
- appNewVersion=$(versionFromGit theile Installomator )
- #appCustomVersion(){/usr/local/bin/Installomator.sh version | tail -1 | awk '{print $4}'}
- expectedTeamID="FXW6QXBFW5"
+ packageID="com.scriptingosx.Installomator"
+ downloadURL=$(downloadURLFromGit Installomator Installomator )
+ appNewVersion=$(versionFromGit Installomator Installomator )
+ expectedTeamID="JME5BW3F3R"
blockingProcesses=( NONE )
;;
istatmenus)
@@ -1990,9 +2132,10 @@ iterm2)
jabradirect)
name="Jabra Direct"
type="pkgInDmg"
+ packageID="com.jabra.directonline"
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"
- 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)
;;
jamfconnect)
name="Jamf Connect"
@@ -2122,6 +2265,19 @@ pycharmce)
appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "location" | tail -1 | sed -E 's/.*\/[a-zA-Z-]*-([0-9.]*).*[-.].*dmg/\1/g' )
expectedTeamID="2ZEFAR8TH3"
;;
+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"
+ ;;
jetbrainstoolbox)
name="JetBrains Toolbox"
type="dmg"
@@ -2233,11 +2389,9 @@ launchbar)
expectedTeamID="MLZF7K7B5R"
;;
lexarrecoverytool)
- # credit: Søren Theilgaard (@theilgaard)
name="Lexar Recovery Tool"
type="appInDmgInZip"
- downloadURL="https://www.lexar.com$( curl -fs "https://www.lexar.com/support/downloads/" | grep -i "mac" | grep -i "recovery" | head -1 | tr '"' '\n' | grep -i ".zip" )"
- #appNewVersion=""
+ downloadURL="https://www.lexar.com/wp-content/uploads/product_images/Lexar-Recovery-Tool-Mac.zip"
expectedTeamID="Y8HM6WR2DV"
;;
libreoffice)
@@ -2253,10 +2407,23 @@ logitechoptions)
name="Logitech Options"
type="pkgInZip"
downloadURL=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}')
- appNewVersion=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}' | sed -E 's/.*_([0-9\.]*)[-\.].*/\1/' )
+ #appNewVersion=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}' | sed -E 's/.*_([0-9\.]*)[-\.].*/\1/' )
pkgName="LogiMgr Installer ${appNewVersion}.app/Contents/Resources/LogiMgr.pkg"
expectedTeamID="QED4VVPZWA"
;;
+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"
+ ;;
loom)
# credit: Lance Stephens (@pythoninthegrass on MacAdmins Slack)
name="Loom"
@@ -2282,6 +2449,13 @@ lulu)
appNewVersion=$(versionFromGit objective-see LuLu)
expectedTeamID="VBG97UB4TA"
;;
+maccyapp)
+ name="Maccy"
+ type="zip"
+ downloadURL="$(downloadURLFromGit p0deje Maccy)"
+ appNewVersion="$(versionFromGit p0deje Maccy)"
+ expectedTeamID="MN3X4648SC"
+ ;;
macfuse)
name="FUSE for macOS"
type="pkgInDmg"
@@ -2289,6 +2463,29 @@ macfuse)
appNewVersion=$(versionFromGit osxfuse osxfuse)
expectedTeamID="3T5GSNBU6W"
;;
+macports)
+ name="MacPorts"
+ type="pkg"
+ #buildVersion=$(uname -r | cut -d '.' -f 1)
+ case $(uname -r | cut -d '.' -f 1) in
+ 21)
+ archiveName="Monterey.pkg"
+ ;;
+ 20)
+ archiveName="BigSur.pkg"
+ ;;
+ 19)
+ archiveName="Catalina.pkg"
+ ;;
+ *)
+ cleanupAndExit 1 "macOS 10.14 or earlier not supported by Installomator."
+ ;;
+ esac
+ downloadURL=$(downloadURLFromGit macports macports-base)
+ appNewVersion=$(versionFromGit macports macports-base)
+ appCustomVersion(){ if [ -x /opt/local/bin/port ]; then /opt/local/bin/port version | awk '{print $2}'; else "0"; fi }
+ expectedTeamID="QTA3A3B7F3"
+ ;;
malwarebytes)
name="Malwarebytes"
type="pkg"
@@ -2296,17 +2493,38 @@ malwarebytes)
appNewVersion=$(curl -Ifs https://downloads.malwarebytes.com/file/mb3-mac | grep "location" | sed -E 's/.*-Mac-([0-9\.]*)\.pkg/\1/g')
expectedTeamID="GVZRY6KDKR"
;;
+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"
+ ;;
+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"
+ ;;
+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"
+ ;;
mattermost)
name="Mattermost"
type="dmg"
- if [[ $(arch) == i386 ]]; then
- archiveName="mac.dmg"
- elif [[ $(arch) == arm64 ]]; then
- archiveName="mac-m1.dmg"
- fi
+ archiveName="mac-universal.dmg"
downloadURL=$(downloadURLFromGit mattermost desktop)
appNewVersion=$(versionFromGit mattermost desktop )
expectedTeamID="UQ8HT4Q2XM"
+ Mattermost Helper (Renderer).app app.asar
;;
menumeters)
name="MenuMeters"
@@ -2342,6 +2560,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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2352,27 +2574,26 @@ microsoftdefenderatp)
appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.defender.standalone"]/version' 2>/dev/null | sed -E 's/([0-9.]*) .*/\1/')
# No version number in download url
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
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/([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 )
- ;;
+microsoftedgeconsumerstable|\
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/([0-9.]*) .*/\1/')
+ 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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2383,6 +2604,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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2404,6 +2629,10 @@ microsoftoffice365)
expectedTeamID="UBF8T346G9"
# using MS PowerPoint as the 'stand-in' for the entire suite
#appName="Microsoft PowerPoint.app"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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" )
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install )
@@ -2416,6 +2645,10 @@ microsoftofficebusinesspro)
expectedTeamID="UBF8T346G9"
# using MS PowerPoint as the 'stand-in' for the entire suite
appName="Microsoft PowerPoint.app"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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")
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install )
@@ -2427,6 +2660,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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2437,6 +2674,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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2447,6 +2688,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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2457,6 +2702,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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2467,6 +2716,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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2486,6 +2739,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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
@@ -2499,14 +2756,13 @@ microsoftteams)
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"
+ # 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 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"
@@ -2520,6 +2776,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/([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"
+ 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 )
;;
@@ -2530,7 +2790,7 @@ microsoftyammer)
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.yammer.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/([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"
+ #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 ?????? )
;;
miro)
@@ -2548,6 +2808,14 @@ montereyblocker)
appNewVersion=$(versionFromGit Theile montereyblocker )
expectedTeamID="FXW6QXBFW5"
;;
+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"
+ ;;
+
musescore)
name="MuseScore 3"
type="dmg"
@@ -2610,6 +2878,14 @@ notion)
appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | awk '{print $2}' | tr -d '\r\n' | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' )
expectedTeamID="LBQJ96FQ8D"
;;
+nudge)
+ name="Nudge"
+ type="pkg"
+ downloadURL=$(downloadURLFromGit macadmins Nudge )
+ appNewVersion=$(versionFromGit macadmins Nudge )
+ expectedTeamID="9GQZ7KUFR6"
+ archiveName="Nudge-[0-9.]*.pkg"
+ ;;
nvivo)
name="NVivo"
type="dmg"
@@ -2735,12 +3011,37 @@ opera)
versionKey="CFBundleVersion"
expectedTeamID="A2P9LX4JPN"
;;
+ottomatic)
+ name="Otto Matic"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit jorio OttoMatic)
+ appNewVersion=$(versionFromGit jorio OttoMatic)
+ expectedTeamID="RVNL7XC27G"
+ ;;
+
+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"
+ ;;
pacifist)
name="Pacifist"
type="dmg"
downloadURL="https://charlessoft.com/cgi-bin/pacifist_download.cgi?type=dmg"
expectedTeamID="HRLUCP7QP4"
;;
+pandoc)
+ name="Pandoc"
+ type="pkg"
+ packageID="net.johnmacfarlane.pandoc"
+ downloadURL=$(downloadURLFromGit jgm pandoc )
+ appNewVersion=$(versionFromGit jgm pandoc )
+ archiveName="mac.pkg"
+ expectedTeamID="5U2WKE6DES"
+ ;;
parsec)
name="Parsec"
type="pkg"
@@ -2837,11 +3138,10 @@ pymol)
expectedTeamID="26SDDJ756N"
;;
r)
- # credit: Tadayuki Onishi (@kenchan0130)
name="R"
type="pkg"
- downloadURL=$( curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p' )
- appNewVersion=$(curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p')
+ downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '' | sed -E 's/.+"(.+)".+/\1/g' )"
+ appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="VZLD955F6P"
;;
ramboxce)
@@ -2866,6 +3166,21 @@ redeye)
appNewVersion=$( curl -fs "https://www.hexedbits.com/redeye/" | grep "Latest version" | sed -E 's/.*Latest version ([0-9.]*),.*/\1/g' )
expectedTeamID="5VRJU68BZ5"
;;
+remotix)
+ name="Remotix"
+ type="dmg"
+ downloadURL="https://remotix.com/downloads/latest-remotix-mac/"
+ appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*\.dmg/\1/g' )
+ expectedTeamID="K293Y6CVN4"
+ ;;
+remotixagent)
+ name="RemotixAgent"
+ type="pkg"
+ packageID="com.nulana.rxagentmac"
+ downloadURL="https://remotix.com/downloads/latest-agent-mac/"
+ appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*\.pkg/\1/g' )
+ expectedTeamID="K293Y6CVN4"
+ ;;
resiliosynchome)
name="Resilio Sync"
type="dmg"
@@ -2979,10 +3294,10 @@ screamingfrogseospider)
expectedTeamID="CAHEVC3HZC"
;;
screencloudplayer)
- # credit: AP Orlebeke (@apizz)
name="ScreenCloud Player"
type="dmg"
- downloadURL=$(curl -sL "https://screencloud.com/download" | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p')
+ downloadURL=$(curl -fs "https://screencloud.com/download" | sed -n 's/^.*"url":"\(https.*\.dmg\)".*$/\1/p')
+ appNewVersion=$( echo $downloadURL | sed -e 's/.*\/ScreenCloud.*\-\([0-9.]*\)\.dmg/\1/g' )
expectedTeamID="3C4F953K6P"
;;
screenflick)
@@ -2992,6 +3307,13 @@ screenflick)
downloadURL="https://www.araelium.com/screenflick/downloads/Screenflick.zip"
expectedTeamID="28488A87JB"
;;
+sequelpro)
+ name="Sequel Pro"
+ type="dmg"
+ downloadURL="$(downloadURLFromGit sequelpro sequelpro)"
+ appNewVersion="$(versionFromGit sequelpro sequelpro)"
+ expectedTeamID="Media"
+ ;;
shield)
# credit: Søren Theilgaard (@theilgaard)
name="Shield"
@@ -3046,6 +3368,12 @@ sketch)
appNewVersion=$(curl -fs https://www.sketch.com/updates/ | grep "Sketch Version" | head -1 | sed -E 's/.*Version ([0-9.]*)<.*/\1/g') # version from update page
expectedTeamID="WUGMZZ5K46"
;;
+sketchupviewer)
+ name="SketchUpViewer"
+ type="dmg"
+ downloadURL="$(curl -fs https://www.sketchup.com/sketchup/SketchUpViewer-en-dmg | grep ".*." | head -1 | cut -d ">" -f2 | cut -d "<" -f1) # does not result in the same version as downloaded
expectedTeamID="2FNC3A47ZF"
;;
+sqlpropostgres)
+ name="SQLPro for Postgres"
+ type="zip"
+ downloadURL="https://macpostgresclient.com/download.php"
+ expectedTeamID="LKJB72232C"
+ blockingProcesses=( "SQLPro for Postgres" )
+ ;;
+sqlprostudio)
+ name="SQLPro Studio"
+ type="zip"
+ downloadURL="https://www.sqlprostudio.com/download.php"
+ expectedTeamID="LKJB72232C"
+ blockingProcesses=( "SQLPro Studio" )
+ ;;
+steelseriesengine)
+ name="SteelSeries GG"
+ type="pkg"
+ downloadURL="https://steelseries.com/engine/latest/darwin"
+ appNewVersion="$(curl -fsIL "$downloadURL" | grep -i "^location" | sed -E 's/.*SteelSeriesGG([0-9.]*)\.pkg/\1/')"
+ expectedTeamID="6WGL6CHFH2"
+ ;;
+strongsync)
+ name="Strongsync"
+ type="dmg"
+ #downloadURL="https://updates.expandrive.com/apps/strongsync/download_latest"
+ downloadURL=$(curl -fs "https://updates.expandrive.com/appcast/strongsync.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
+ appNewVersion=$(curl -fs "https://updates.expandrive.com/appcast/strongsync.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:version)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
+ versionKey="CFBundleVersion"
+ expectedTeamID="CH86M498V4"
+ ;;
sublimetext)
# credit: Søren Theilgaard (@theilgaard)
name="Sublime Text"
@@ -3129,6 +3491,17 @@ sublimetext)
appNewVersion=$(curl -fs https://www.sublimetext.com/download | grep -i -A 4 "id.*changelog" | grep -io "Build [0-9]*")
expectedTeamID="Z6D26JE4Y4"
;;
+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"
+ ;;
supportapp)
# credit: Søren Theilgaard (@theilgaard)
name="Support"
@@ -3181,6 +3554,13 @@ tageditor)
appNewVersion=curl -sf "https://amvidia.com/tag-editor" | grep -o -E '"softwareVersion":.'"{8}" | sed 's/\"//g' | awk -F ': ' '{print $2}'
expectedTeamID="F2TH9XX9CJ"
;;
+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"
+ ;;
taskpaper)
# credit: Drew Diver (@grumpydrew on MacAdmins Slack)
name="TaskPaper"
@@ -3307,6 +3687,15 @@ tunnelblick)
downloadURL=$(downloadURLFromGit TunnelBlick Tunnelblick )
expectedTeamID="Z2SG5H3HC8"
;;
+typora)
+ name="Typora"
+ type="dmg"
+ #downloadURL="https://www.typora.io/download/Typora.dmg"
+ downloadURL=$(curl -fs "https://www.typora.io/download/dev_update.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2)
+ #appNewVersion="$(curl -fs "https://www.typora.io/dev_release.html" | grep -o -i "h4>[0-9.]*([0-9.]*)<\/h4.*/\1/')"
+ appNewVersion=$(curl -fs "https://www.typora.io/download/dev_update.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2)
+ expectedTeamID="9HWK5273G4"
+ ;;
umbrellaroamingclient)
# credit: Tadayuki Onishi (@kenchan0130)
name="Umbrella Roaming Client"
@@ -3336,13 +3725,11 @@ utm)
expectedTeamID="WDNLXAD4W8"
;;
vagrant)
- # credit: AP Orlebeke (@apizz)
name="Vagrant"
type="pkgInDmg"
pkgName="vagrant.pkg"
- downloadURL=$(curl -fs https://www.vagrantup.com/downloads | tr '><' '\n' | awk -F'"' '/x86_64.dmg/ {print $6}' | head -1)
- #appNewVersion=$( curl -fs https://www.vagrantup.com/downloads.html | grep -i "Current Version" )
- appNewVersion=$(versionFromGit hashicorp vagrant)
+ downloadURL=$(curl -fs "https://www.vagrantup.com/downloads" | tr '"' '\n' | grep "^https.*\.dmg$" | head -1)
+ appNewVersion=$( echo $downloadURL | cut -d "/" -f5 )
expectedTeamID="D38WU7D763"
;;
vanilla)
@@ -3404,16 +3791,21 @@ vmwarehorizonclient)
expectedTeamID="EG7KH642X6"
;;
vscodium)
- # credit: AP Orlebeke (@apizz)
name="VSCodium"
type="dmg"
- downloadURL=$(curl -fs "https://api.github.com/repos/VSCodium/vscodium/releases/latest" | awk -F '"' "/browser_download_url/ && /dmg/ && ! /sig/ && ! /CLI/ && ! /sha256/ { print \$4 }")
- #downloadURL=$(downloadURLFromGit VSCodium vscodium) # Too many versions
- appNewVersion=$(versionFromGit VSCodium vscodium)
+ downloadURL="$(downloadURLFromGit VSCodium vscodium)"
+ appNewVersion="$(versionFromGit VSCodium vscodium)"
expectedTeamID="C7S3ZQ2B8V"
- appName="VSCodium.app"
blockingProcesses=( Electron )
;;
+wacomdrivers)
+ name="Wacom Desktop Center"
+ type="pkgInDmg"
+ downloadURL="$(curl -fs https://www.wacom.com/en-us/support/product-support/drivers | grep -e "drivers/mac/professional.*dmg" | head -1 | sed -e 's/data-download-link="//g' -e 's/"//' | awk '{$1=$1}{ print }' | sed 's/\r//')"
+ expectedTeamID="EG27766DY7"
+ pkgName="Install Wacom Tablet.pkg"
+ appNewVersion="$(curl -fs https://www.wacom.com/en-us/support/product-support/drivers | grep mac/professional/releasenotes | head -1 | awk -F"|" '{print $1}' | awk -F"Driver" '{print $3}' | sed -e 's/ (.*//g' | tr -d ' ')"
+ ;;
wallyezflash)
name="Wally"
type="dmg"
@@ -3490,9 +3882,10 @@ xeroxphaser7800)
;;
xink)
name="Xink"
- type="zip"
- downloadURL="https://downloads.xink.io/macos/client"
- #appNewVersion=$() # Cannot find version history or release notes on home page
+ type="pkg"
+ packageID="com.emailsignature.Xink"
+ downloadURL="https://downloads.xink.io/macos/pkg"
+ appNewVersion=$(curl -fs "https://downloads.xink.io/macos/appcast" | xpath '(//rss/channel/item/enclosure/@sparkle:version)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
expectedTeamID="F287823HVS"
;;
xquartz)
@@ -3543,6 +3936,17 @@ zohoworkdrive)
downloadURL=$(echo "$lines" | grep -i "files-accl.zohopublic.com")$(echo "$lines" | grep -i -A17 "files-accl.zohopublic.com" | grep -i -A2 macintosh | tail -1)
expectedTeamID="TZ824L8Y37"
;;
+zohoworkdrivetruesync)
+# Using this label expects you to agree to these:
+# License Areemant: https://www.zoho.com/workdrive/zohoworkdrive-license-agreement.html
+# Privacy policy: https://www.zoho.com/privacy.html
+ name="Zoho WorkDrive TrueSync"
+ type="pkg"
+ #https://www.zoho.com/workdrive/truesync.html
+ #https://files-accl.zohopublic.com/public/tsbin/download/c488f53fb0fe339a8a3868a16d56ede6
+ downloadURL=$(curl -fs "https://www.zoho.com/workdrive/truesync.html" | tr '<' '\n' | grep -B3 "For Mac" | grep -o -m1 "https.*\"" | cut -d '"' -f1)
+ expectedTeamID="TZ824L8Y37"
+ ;;
zoom)
name="zoom.us"
type="pkg"
@@ -3751,6 +4155,10 @@ printlog "appversion: $appversion"
# MARK: Exit if new version is the same as installed version (appNewVersion specified)
# credit: Søren Theilgaard (@theilgaard)
+if [[ $INSTALL == "force" ]]; then
+ printlog "Using force to install, so not using updateTool."
+ updateTool=""
+fi
if [[ -n $appNewVersion ]]; then
printlog "Latest version of $name is $appNewVersion"
if [[ $appversion == $appNewVersion ]]; then
@@ -3763,9 +4171,6 @@ if [[ -n $appNewVersion ]]; then
displaynotification "$message" "No update for $name!"
fi
cleanupAndExit 0 "No newer version."
- else
- printlog "Using force to install anyway. Not using updateTool."
- updateTool=""
fi
else
printlog "DEBUG mode enabled, not exiting, but there is no new version of app."
@@ -3773,10 +4178,6 @@ if [[ -n $appNewVersion ]]; then
fi
else
printlog "Latest version not specified."
- if [[ $INSTALL == "force" ]]; then
- printlog "Using force to install, so not using updateTool."
- updateTool=""
- fi
fi
# MARK: check if this is an Update and we can use updateTool
@@ -3803,14 +4204,22 @@ else
printlog "Downloading $downloadURL to $archiveName"
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
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
if ! curl --location --fail --silent "$downloadURL" -o "$archiveName"; then
printlog "error downloading $downloadURL"
message="$name update/installation failed. This will be logged, so IT can follow up."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
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
cleanupAndExit 2
fi
@@ -3833,7 +4242,17 @@ fi
printlog "Installing $name"
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
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
case $type in
diff --git a/Labels.txt b/Labels.txt
index 5e72460..e873028 100644
--- a/Labels.txt
+++ b/Labels.txt
@@ -4,6 +4,7 @@
abstract
adobebrackets
adobeconnect
+adobecreativeclouddesktop
adobereaderdc
adobereaderdc-install
adobereaderdc-update
@@ -11,6 +12,7 @@ aircall
airserver
airtame
aldente
+alephone
alfred
alttab
amazonchime
@@ -49,15 +51,19 @@ boxdrive
boxsync
boxtools
brave
+bugdom
caffeine
cakebrew
calibre
camostudio
camtasia
+canva
+chatwork
cisdem-documentreader
citrixworkspace
clevershare2
clickshare
+closeio
cloudya
code42
coderunner
@@ -76,6 +82,7 @@ desktoppr
detectxswift
devonthink
dialog
+dialpad
discord
docker
drift
@@ -84,13 +91,17 @@ easeusdatarecoverywizard
egnyte
element
eraseinstall
+eshareosx
etrecheck
evernote
exelbanstats
+exifrenamer
fantastical
+fastscripts
favro
ferdi
figma
+findanyfile
firefox
firefox_da
firefox_intl
@@ -129,6 +140,7 @@ icons
imazingprofileeditor
inkscape
insomnia
+installomator
installomator_theile
intellijideace
istatmenus
@@ -146,6 +158,7 @@ jetbrainsintellijideace
jetbrainsphpstorm
jetbrainspycharm
jetbrainspycharmce
+jetbrainsrubymine
jetbrainstoolbox
jetbrainswebstorm
karabinerelements
@@ -162,11 +175,17 @@ launchbar
lexarrecoverytool
libreoffice
logitechoptions
+logseq
loom
lucifer
lulu
+maccyapp
macfuse
+macports
malwarebytes
+marathon
+marathon2
+marathoninfinity
mattermost
menumeters
microsoftautoupdate
@@ -193,6 +212,7 @@ microsoftword
microsoftyammer
miro
montereyblocker
+mowgliiitsycal
musescore
muzzle
netnewswire
@@ -200,6 +220,7 @@ nextcloud
nomad
nomadlogin
notion
+nudge
nvivo
obs
obsidian
@@ -217,7 +238,10 @@ onlyofficedesktop
openvpnconnect
openvpnconnectv3
opera
+ottomatic
+overflow
pacifist
+pandoc
parsec
pdfsam
perimeter81
@@ -237,6 +261,8 @@ r
ramboxce
rectangle
redeye
+remotix
+remotixagent
resiliosynchome
retrobatch
ricohpsprinters
@@ -254,6 +280,7 @@ scaleft
screamingfrogseospider
screencloudplayer
screenflick
+sequelpro
sfsymbols
shield
sidekick
@@ -262,6 +289,7 @@ silnite
sirimote
sizeup
sketch
+sketchupviewer
skype
slack
smartgit
@@ -275,7 +303,12 @@ sonoss2
sourcetree
splashtopsos
spotify
+sqlpropostgres
+sqlprostudio
+steelseriesengine
+strongsync
sublimetext
+superhuman
supportapp
suspiciouspackage
swiftruntimeforcommandlinetools
@@ -283,6 +316,7 @@ sync
tableaudesktop
tableaureader
tageditor
+talkdeskcallbar
taskpaper
teamviewer
teamviewerhost
@@ -300,6 +334,7 @@ torbrowser
trex
tunnelbear
tunnelblick
+typora
umbrellaroamingclient
uniconverter
universaltypeclient
@@ -314,6 +349,7 @@ vivaldi
vlc
vmwarehorizonclient
vscodium
+wacomdrivers
wallyezflash
webex
webexmeetings
@@ -331,6 +367,7 @@ yubikeymanagerqt
zappy
zeplin
zohoworkdrive
+zohoworkdrivetruesync
zoom
zoomclient
zoomgov
diff --git a/MDM/App script.sh b/MDM/App script.sh
new file mode 100755
index 0000000..a23fd95
--- /dev/null
+++ b/MDM/App script.sh
@@ -0,0 +1,168 @@
+#!/bin/zsh
+# Installation using Installomator
+what="brave" # enter the software to install
+
+# To be used as a script sent out from a MDM.
+# Fill the variable "what" above with a label.
+# Script will run this label.
+###############################################
+
+# No sleeping
+/usr/bin/caffeinate -d -i -m -u &
+caffeinatepid=$!
+caffexit () {
+ kill "$caffeinatepid"
+ exit $1
+}
+
+# Verify that Installomator has been installed
+destFile="/usr/local/Installomator/Installomator.sh"
+if [ ! -e "${destFile}" ]; then
+ echo "Installomator not found here:"
+ echo "${destFile}"
+ echo "Exiting."
+ caffexit 99
+fi
+
+${destFile} ${what} LOGO=mosyleb BLOCKING_PROCESS_ACTION=tell_user #NOTIFY=all #INSTALL=force
+if [ $? != 0 ]; then
+# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
+ echo "Error installing ${what}. Exit code $?"
+ caffexit $?
+fi
+
+echo "[$(DATE)][LOG-END]"
+
+caffexit 0
+
+# notify behavior
+# NOTIFY=success
+# options:
+# - success notify the user on success
+# - silent no notifications
+# - all all notifications (great for Self Service installation)
+
+
+# behavior when blocking processes are found
+# BLOCKING_PROCESS_ACTION=tell_user
+# options:
+# - ignore continue even when blocking processes are found
+# - quit app will be told to quit nicely, if running
+# - quit_kill told to quit twice, then it will be killed
+# Could be great for service apps, if they do not respawn
+# - silent_fail exit script without prompt or installation
+# - prompt_user show a user dialog for each blocking process found
+# abort after three attempts to quit
+# (only if user accepts to quit the apps, otherwise
+# the update is cancelled).
+# - prompt_user_then_kill
+# show a user dialog for each blocking process found,
+# attempt to quit two times, kill the process finally
+# - prompt_user_loop
+# Like prompt-user, but clicking "Not Now", will just wait an hour,
+# and then it will ask again.
+# WARNING! It might block the MDM agent on the machine, as
+# the scripts gets stuct in waiting until the hour has passed,
+# possibly blocking for other management actions in this time.
+# - tell_user User will be showed a notification about the important update,
+# but user is only allowed to quit and continue, and then we
+# ask the app to quit.
+# - tell_user_then_kill
+# Show dialog 2 times, and if the quitting fails, the
+# blocking processes will be killed.
+# - kill kill process without prompting or giving the user a chance to save
+
+
+# logo-icon used in dialog boxes if app is blocking
+# LOGO=appstore
+# options:
+# - appstore Icon is Apple App Store (default)
+# - jamf JAMF Pro
+# - mosyleb Mosyle Business
+# - mosylem Mosyle Manager (Education)
+# - addigy Addigy
+# path can also be set in the command call, and if file exists, it will be used.
+# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"'
+# (spaces have to be escaped).
+
+
+# App Store apps handling
+# IGNORE_APP_STORE_APPS=no
+# options:
+# - no If installed app is from App Store (which include VPP installed apps)
+# it will not be touched, no matter it's version (default)
+# - yes Replace App Store (and VPP) version of app and handle future
+# updates using Installomator, even if latest version.
+# Shouldn’t give any problems for the user in most cases.
+# Known bad example: Slack will loose all settings.
+
+
+# install behavior
+# INSTALL=""
+# options:
+# - When not set, software will only be installed
+# if it is newer/different in version
+# - force Install even if it’s the same version
+
+
+# Re-opening of closed app
+# REOPEN="yes"
+# options:
+# - yes App wil be reopened if it was closed
+# - no App not reopened
+
+
+########################
+# Often used labels:
+########################
+
+# firefox
+# firefox_intl
+# brave
+# torbrowser
+# googlechrome
+# netnewswire
+
+# adobereaderdc
+# textmate
+
+# cyberduck
+# keka
+# theunarchiver
+
+# vlc
+# handbrake
+
+# inkscape
+
+# signal
+# telegram
+# whatsapp
+
+# hazel
+# devonthink
+
+# teamviewerqs
+# zoom
+
+# malwarebytes
+# githubdesktop
+# sublimetext
+# textmate
+# visualstudiocode
+
+# microsoftskypeforbusiness
+# microsoftteams
+# microsoftyammer
+# microsoftedgeenterprisestable
+# microsoftedgeconsumerstable
+# microsoftsharepointplugin
+# microsoftdefenderatp
+
+# googledrivefilestream
+
+# cdef
+# desktoppr
+# supportapp
+# xink
+# wwdc
diff --git a/MDM/App-loop script.sh b/MDM/App-loop script.sh
new file mode 100755
index 0000000..f8b1025
--- /dev/null
+++ b/MDM/App-loop script.sh
@@ -0,0 +1,176 @@
+#!/bin/zsh
+# Installation using Installomator
+what="microsoftteams microsoftyammer firefox bravebrowser cyberduck vlc signal" # enter the software to install separated with spaces
+
+# To be used as a script sent out from a MDM.
+# Fill the variable "what" above with labels separated by space " ".
+# Script will loop through these labels.
+######################################################################
+
+# No sleeping
+/usr/bin/caffeinate -d -i -m -u &
+caffeinatepid=$!
+caffexit () {
+ kill "$caffeinatepid"
+ exit $1
+}
+
+# Count errors
+errorCount=0
+
+# Verify that Installomator has been installed
+destFile="/usr/local/Installomator/Installomator.sh"
+if [ ! -e "${destFile}" ]; then
+ echo "Installomator not found here:"
+ echo "${destFile}"
+ echo "Exiting."
+ caffexit 99
+fi
+
+for item in $what; do
+ #echo $item
+ ${destFile} ${item} LOGO=mosyleb BLOCKING_PROCESS_ACTION=tell_user #NOTIFY=all #INSTALL=force
+ if [ $? != 0 ]; then
+ # This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
+ echo "[$(DATE)] Error installing ${item}. Exit code $?"
+ let errorCount++
+ fi
+done
+
+echo
+echo "Errors: $errorCount"
+echo "[$(DATE)][LOG-END]"
+
+caffexit $errorCount
+
+# notify behavior
+# NOTIFY=success
+# options:
+# - success notify the user on success
+# - silent no notifications
+# - all all notifications (great for Self Service installation)
+
+
+# behavior when blocking processes are found
+# BLOCKING_PROCESS_ACTION=tell_user
+# options:
+# - ignore continue even when blocking processes are found
+# - quit app will be told to quit nicely, if running
+# - quit_kill told to quit twice, then it will be killed
+# Could be great for service apps, if they do not respawn
+# - silent_fail exit script without prompt or installation
+# - prompt_user show a user dialog for each blocking process found
+# abort after three attempts to quit
+# (only if user accepts to quit the apps, otherwise
+# the update is cancelled).
+# - prompt_user_then_kill
+# show a user dialog for each blocking process found,
+# attempt to quit two times, kill the process finally
+# - prompt_user_loop
+# Like prompt-user, but clicking "Not Now", will just wait an hour,
+# and then it will ask again.
+# WARNING! It might block the MDM agent on the machine, as
+# the scripts gets stuct in waiting until the hour has passed,
+# possibly blocking for other management actions in this time.
+# - tell_user User will be showed a notification about the important update,
+# but user is only allowed to quit and continue, and then we
+# ask the app to quit.
+# - tell_user_then_kill
+# Show dialog 2 times, and if the quitting fails, the
+# blocking processes will be killed.
+# - kill kill process without prompting or giving the user a chance to save
+
+
+# logo-icon used in dialog boxes if app is blocking
+# LOGO=appstore
+# options:
+# - appstore Icon is Apple App Store (default)
+# - jamf JAMF Pro
+# - mosyleb Mosyle Business
+# - mosylem Mosyle Manager (Education)
+# - addigy Addigy
+# path can also be set in the command call, and if file exists, it will be used.
+# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"'
+# (spaces have to be escaped).
+
+
+# App Store apps handling
+# IGNORE_APP_STORE_APPS=no
+# options:
+# - no If installed app is from App Store (which include VPP installed apps)
+# it will not be touched, no matter it's version (default)
+# - yes Replace App Store (and VPP) version of app and handle future
+# updates using Installomator, even if latest version.
+# Shouldn’t give any problems for the user in most cases.
+# Known bad example: Slack will loose all settings.
+
+
+# install behavior
+# INSTALL=""
+# options:
+# - When not set, software will only be installed
+# if it is newer/different in version
+# - force Install even if it’s the same version
+
+
+# Re-opening of closed app
+# REOPEN="yes"
+# options:
+# - yes App wil be reopened if it was closed
+# - no App not reopened
+
+
+########################
+# Often used labels:
+########################
+
+# firefox
+# firefox_intl
+# brave
+# torbrowser
+# googlechrome
+# netnewswire
+
+# adobereaderdc
+# textmate
+
+# cyberduck
+# keka
+# theunarchiver
+
+# vlc
+# handbrake
+
+# inkscape
+
+# signal
+# telegram
+# whatsapp
+
+# hazel
+# devonthink
+
+# teamviewerqs
+# zoom
+
+# malwarebytes
+# githubdesktop
+# sublimetext
+# textmate
+# visualstudiocode
+
+# microsoftskypeforbusiness
+# microsoftteams
+# microsoftyammer
+# microsoftedgeenterprisestable
+# microsoftedgeconsumerstable
+# microsoftsharepointplugin
+# microsoftdefenderatp
+
+# googledrivefilestream
+
+# cdef
+# desktoppr
+# supportapp
+# xink
+# wwdc
diff --git a/MDM/Installomator update.sh b/MDM/Installomator update.sh
new file mode 100755
index 0000000..fbc8327
--- /dev/null
+++ b/MDM/Installomator update.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# Updating Installomator
+# Usefull to push out after deployment if earlier version was deployed in DEP profile
+# Currently script uses valuesfromarguments as a label is not included before next release, so this can be used to install to version 0.7
+
+what="installomator" # enter the software to install
+
+# No sleeping
+/usr/bin/caffeinate -d -i -m -u &
+caffeinatepid=$!
+caffexit () {
+ kill "$caffeinatepid"
+ exit $1
+}
+
+# Verify that Installomator has been installed
+destFile="/usr/local/Installomator/Installomator.sh"
+if [ ! -e "${destFile}" ]; then
+ echo "Installomator not found here:"
+ echo "${destFile}"
+ echo "Exiting."
+ caffexit 99
+fi
+
+${destFile} valuesfromarguments\
+ name=Installomator \
+ type=pkg \
+ packageID=com.scriptingosx.Installomator \
+ downloadURL=https://github.com/Installomator/Installomator/releases/download/v0.7release/Installomator-0.7.0.pkg \
+ appNewVersion=0.7 \
+ expectedTeamID=JME5BW3F3R \
+ BLOCKING_PROCESS_ACTION=ignore \
+ NOTIFY=silent
+
+# ${destFile} ${what} BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent
+if [ $? != 0 ]; then
+# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
+ echo "Error installing ${what}. Exit code $?"
+ caffexit $?
+fi
+
+echo "[$(DATE)][LOG-END]"
+caffexit 0
diff --git a/MDM/MDMAddigy CustomSoftware.sh b/MDM/MDMAddigy CustomSoftware.sh
new file mode 100755
index 0000000..864e2d4
--- /dev/null
+++ b/MDM/MDMAddigy CustomSoftware.sh
@@ -0,0 +1,99 @@
+#!/bin/zsh
+
+# Specific settings in Addigy to configure Custom Software for installomator.
+# Addigy has 3 parts to fill out for this, Installation script, Condition, and Removal steps (see RemoveInstallomator.sh).
+
+# Mark: Installation script
+# Just click “Add” to autogenerate the installer script line by clicking the “Add”-button next to the Installer PKG, replace with first line below
+/usr/sbin/installer -pkg "/Library/Addigy/ansible/packages/Installomator (0.7.0)/Installomator-0.7.0.pkg" -target /
+
+# Installation using Installomator
+what="supportapp xink textmate microsoftedge wwdc keka vlc " # enter the software to installed separated with spaces
+
+# To be used as a script sent out from a MDM.
+# Fill the variable "what" above with labels separated by space " ".
+# Script will loop through these labels and exit with number of errors.
+######################################################################
+
+# No sleeping
+/usr/bin/caffeinate -d -i -m -u &
+caffeinatepid=$!
+caffexit () {
+ kill "$caffeinatepid"
+ exit $1
+}
+
+# Count errors
+errorCount=0
+
+# Verify that Installomator has been installed
+destFile="/usr/local/Installomator/Installomator.sh"
+if [ ! -e "${destFile}" ]; then
+ echo "Installomator not found here:"
+ echo "${destFile}"
+ echo "Exiting."
+ caffexit 99
+fi
+
+for item in $what; do
+ #echo $item
+ ${destFile} ${item} LOGO=addigy NOTIFY=silent BLOCKING_PROCESS_ACTION=quit_kill #INSTALL=force
+ if [ $? != 0 ]; then
+ # Error handling
+ echo "[$(DATE)] Error installing ${item}. Exit code $?"
+ let errorCount++
+ fi
+done
+
+echo
+echo "Errors: $errorCount"
+echo "[$(DATE)][LOG-END]"
+
+caffexit $errorCount
+
+# Mark: Conditions
+# Install on success
+# Remember to fill out the correct “TARGET_VERSION” and “PKG_ID”, and click "Install on succes".
+PKG_ID="com.scriptingosx.Installomator"
+TARGET_VERSION="0.7.0"
+
+vercomp () {
+ if [[ $1 == $2 ]]; then
+ return 0
+ fi
+ local IFS=.
+ local i ver1=($1) ver2=($2)
+ # fill empty fields in ver1 with zeros
+ for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
+ ver1[i]=0
+ done
+ for ((i=0; i<${#ver1[@]}; i++)); do
+ if [[ -z ${ver2[i]} ]]; then
+ # fill empty fields in ver2 with zeros
+ ver2[i]=0
+ fi
+ if ((10#${ver1[i]} > 10#${ver2[i]})); then
+ return 1
+ fi
+ if ((10#${ver1[i]} < 10#${ver2[i]})); then
+ return 2
+ fi
+ done
+ return 0
+}
+
+INSTALLED_VERSION="$(pkgutil --pkg-info $PKG_ID | grep -i "^version" | awk '{print $2}')"
+
+echo "Current Version: ${INSTALLED_VERSION}"
+
+vercomp ${TARGET_VERSION} ${INSTALLED_VERSION}
+COMP=$? # 0 means the same, 1 means TARGET is newer, 2 means INSTALLED is newer
+echo "COMPARISON: ${COMP}"
+
+if [ "${COMP}" -eq 1 ]; then
+ echo "Installed version is older than ${TARGET_VERSION}."
+ exit 0
+else
+ echo "Installed version is the same or newer than ${TARGET_VERSION}."
+ exit 1
+fi
diff --git a/MDM/MDMMosyle install.sh b/MDM/MDMMosyle install.sh
new file mode 100644
index 0000000..5a628f7
--- /dev/null
+++ b/MDM/MDMMosyle install.sh
@@ -0,0 +1,72 @@
+PKG_ID="com.scriptingosx.Installomator"
+TARGET_VERSION="0.7.0"
+URLDOWNLOAD="%MosyleCDNFile:blah-blah-blah%"
+######################################################################
+# Installation using Installomator (enter the software to install separated with spaces in the "what"-variable)
+what="handbrake theunarchiver microsoftoffice365"
+# Covered by Mosyle Catalog: "brave firefox googlechrome microsoftedge microsoftteams signal sublimetext vlc webex zoom" among others
+######################################################################
+
+## Mark: Code here
+
+# No sleeping
+/usr/bin/caffeinate -d -i -m -u &
+caffeinatepid=$!
+caffexit () {
+ kill "$caffeinatepid"
+ exit $1
+}
+
+# Mark: Condition for Installomator installation
+
+INSTALLED_VERSION="$(pkgutil --pkg-info $PKG_ID 2>/dev/null | grep -i "^version" | awk '{print $2}')"
+
+echo "Current Version: ${INSTALLED_VERSION}"
+
+if [[ "$TARGET_VERSION" != "$INSTALLED_VERSION" ]]; then
+ TMPDIR=$(mktemp -d )
+ if ! cd "$TMPDIR"; then
+ echo "error changing directory $TMPDIR"
+ caffexit 98
+ fi
+ NAME=$TMPDIR/$(date +%s).pkg
+ if ! curl -fsL "$URLDOWNLOAD" -o "$NAME"; then
+ echo "error downloading $URLDOWNLOAD to $NAME."
+ caffexit 97
+ fi
+ installer -pkg "$NAME" -target /
+ rm -rf "$TMPDIR"
+else
+ echo "Installomator version $INSTALLED_VERSION already installed!"
+fi
+
+
+# Mark: Start Installomator label(s) installation
+
+# Count errors
+errorCount=0
+
+# Verify that Installomator has been installed
+destFile="/usr/local/Installomator/Installomator.sh"
+if [ ! -e "${destFile}" ]; then
+ echo "Installomator not found here:"
+ echo "${destFile}"
+ echo "Exiting."
+ caffexit 99
+fi
+
+for item in $what; do
+ #echo $item
+ ${destFile} ${item} LOGO=mosyle NOTIFY=all BLOCKING_PROCESS_ACTION=tell_user #NOTIFY=silent BLOCKING_PROCESS_ACTION=quit_kill #INSTALL=force
+ if [ $? != 0 ]; then
+ # Error handling
+ echo "[$(DATE)] Error installing ${item}. Exit code $?"
+ let errorCount++
+ fi
+done
+
+echo
+echo "Errors: $errorCount"
+echo "[$(DATE)][LOG-END]"
+
+caffexit $errorCount
diff --git a/MDM/Manual valuesfromarguments.sh b/MDM/Manual valuesfromarguments.sh
new file mode 100755
index 0000000..f435825
--- /dev/null
+++ b/MDM/Manual valuesfromarguments.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+# Installation using Installomator
+# Example of installing software using valuesfromarguments to install a custom software
+
+what="valuesfromarguments" # enter the software to install
+
+# No sleeping
+/usr/bin/caffeinate -d -i -m -u &
+caffeinatepid=$!
+caffexit () {
+ kill "$caffeinatepid"
+ exit $1
+}
+
+# Verify that Installomator has been installed
+destFile="/usr/local/Installomator/Installomator.sh"
+if [ ! -e "${destFile}" ]; then
+ echo "Installomator not found here:"
+ echo "${destFile}"
+ echo "Exiting."
+ caffexit 99
+fi
+
+${destFile} valuesfromarguments \
+ name=\"Zoho\ WorkDrive\" \
+ type=dmg \
+ downloadURL=https://files-accl.zohopublic.com/public/wdbin/download/46f971e4fc4a32b68ad5d7dade38a7d2 \
+ appNewVersion=2.6.25 \
+ expectedTeamID=TZ824L8Y37 \
+ BLOCKING_PROCESS_ACTION=quit \
+ NOTIFY=all
+
+# ${destFile} ${what} BLOCKING_PROCESS_ACTION=ignore NOTIFY=silent
+if [ $? != 0 ]; then
+# This is currently not working in Mosyle, that will ignore script errors. Please request support for this from Mosyle!
+ echo "Error installing ${what}. Exit code $?"
+ caffexit $?
+fi
+
+echo "[$(DATE)][LOG-END]"
+caffexit 0
diff --git a/MDM/RemoveInstallomator.sh b/MDM/RemoveInstallomator.sh
new file mode 100644
index 0000000..8a6b405
--- /dev/null
+++ b/MDM/RemoveInstallomator.sh
@@ -0,0 +1,13 @@
+#!/bin/zsh
+
+# how to remove Installomator.
+
+# Mark: This fork
+pkgutil --forget "com.scriptingosx.Installomator"
+rm /usr/local/Installomator/Installomator.sh
+rmdir /usr/local/Installomator
+
+# Mark: Theile fork
+pkgutil --forget "dk.theilgaard.pkg.Installomator"
+rm /usr/local/bin/Installomator.sh
+rm /usr/local/bin/InstallomatorLabels.sh
diff --git a/README.md b/README.md
index 2cfb90a..aef13c3 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ I have put a lot of work into making it stable and safe, but I cannot - of cours
## Support and Contributing
-__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the fragmented files, not the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten. See the REAMDME.md file in the `utils` directory for detailed instructions.__
+__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the files below `fragments`-folder. DO NOT edit the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten. See the REAMDME.md file in the `utils` directory for detailed instructions.__
Discussion, support and advice around Installomator happens in the `#installomator` channel in the [MacAdmins.org Slack](https://macadmins.org). Go there for support questions.
@@ -26,7 +26,6 @@ There are a few interesting post on Installomator on my weblog:
- [Introducing Installomator](https://scriptingosx.com/2020/05/introducing-installomator/)
- [Using Installomator with Jamf Pro](https://scriptingosx.com/2020/06/using-installomator-with-jamf-pro/) by Mischa van der Bent
-- [Using another MDM than Jamf and you might want a local installation](https://github.com/Theile/Installomator/) By Søren Theilgaard
## Background
@@ -112,7 +111,7 @@ There is a debug mode and one other setting that can be controlled with variable
### Extensible
-As of this writing, Installomator knows how to download and install more than 238 different applications. You can add more by adding a block to the _long_ `case` statement starting on line 758. Some of them are more elaborate, but most of them (just) need this information (not really "just" in this case, as we have to differentiate between arm64 and i386 versions for both `downloadURL` and `appNewVersion`):
+As of this writing, Installomator knows how to download and install more than 364 different applications. You can add more by adding new labels to the `fragments`-folder. Below is an example of a label, and most of them (just) needs this information (not really "just" in this case, as we have to differentiate between arm64 and i386 versions for both `downloadURL` and `appNewVersion`):
```
googlechrome)
@@ -121,11 +120,11 @@ googlechrome)
if [[ $(arch) != "i386" ]]; then
printlog "Architecture: arm64 (not i386)"
downloadURL="https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg"
- appNewVersion=$(curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac_arm64,stable/{print $3; exit}') # Credit: William Smith (@meck)
+ appNewVersion=$(curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac_arm64,stable/{print $3; exit}')
else
printlog "Architecture: i386"
downloadURL="https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
- appNewVersion=$(curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac,stable/{print $3; exit}') # Credit: William Smith (@meck)
+ appNewVersion=$(curl -s https://omahaproxy.appspot.com/history | awk -F',' '/mac,stable/{print $3; exit}')
fi
expectedTeamID="EQHXZ8M8AV"
;;
@@ -141,7 +140,7 @@ Please note: Labels should be named in small caps, numbers 0-9, “-”, and “
I wrote this script mainly for use with Jamf Pro, because that is what we use. For testing, you can run the script interactively from the command line. However, I have tried to keep anything that is specific to Jamf optional, or so flexible that it will work anywhere. Even if it does not work with your management system 'out of the box,' the adaptations should be straightforward.
-Not all MDMs can include the full script, for those MDMs it might be more useful to install it on the client machines, and run it from there. See [Using another MDM than Jamf and you might want a local installation](https://github.com/Theile/Installomator/) By Søren Theilgaard.
+Not all MDMs can include the full script, for those MDMs it might be more useful to install it on the client machines, and run it from there. So a PKG to be installed on client Macs is also provided here.
### No dependencies
@@ -267,7 +266,7 @@ __options:__
Since we now make a version checking, and only installs the software if the version is different, an `INSTALL` variable can be used to force the installation:
-- ``: When not set, software is only installed if it is newer/different in version (default)
+- ` `: When not set, software is only installed if it is newer/different in version (default)
- `force`: Install even if it’s the same version
### Re-opening of closed app
@@ -372,11 +371,24 @@ Depending on the application or pkg there are a few more variables you can or ne
`$updateTool $updateArguments`
Will be run instead of of downloading and installing a complete new version.
Use this when the `updateTool` does differential and optimized downloads.
- e.g. `msupdate` (see microsoft installations)
+ e.g. `msupdate` (see various Microsoft installations).
- `updateToolRunAsCurrentUser`:
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 it’s 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
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
diff --git a/fragments/arguments.sh b/fragments/arguments.sh
index 0ce33a2..0f8765f 100644
--- a/fragments/arguments.sh
+++ b/fragments/arguments.sh
@@ -36,9 +36,20 @@ done
# lowercase the label
label=${label:l}
+# separate check for 'version' in order to print plain version number without any other information
+if [[ $label == "version" ]]; then
+ echo "$VERSION"
+ exit 0
+fi
+
printlog "################## Start Installomator v. $VERSION"
printlog "################## $label"
+# Check for DEBUG mode
+if [[ $DEBUG -gt 0 ]]; then
+ printlog "DEBUG mode $DEBUG enabled."
+fi
+
# How we get version number from app
# (alternative is "CFBundleVersion", that can be used in labels)
versionKey="CFBundleShortVersionString"
@@ -54,11 +65,6 @@ fi
# MARK: labels in case statement
case $label in
-version)
- # print the script VERSION
- printlog "$VERSION"
- exit 0
- ;;
longversion)
# print the script version
printlog "Installomater: version $VERSION ($VERSIONDATE)"
diff --git a/fragments/broken/mightymike.sh b/fragments/broken/mightymike.sh
new file mode 100644
index 0000000..b241a6a
--- /dev/null
+++ b/fragments/broken/mightymike.sh
@@ -0,0 +1,7 @@
+mightymike)
+ name="Nanosaur"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit jorio MightyMike)
+ appNewVersion=$(versionFromGit jorio MightyMike)
+ expectedTeamID="RVNL7XC27G"
+ ;;
diff --git a/fragments/broken/nanosaur.sh b/fragments/broken/nanosaur.sh
new file mode 100644
index 0000000..980f53e
--- /dev/null
+++ b/fragments/broken/nanosaur.sh
@@ -0,0 +1,7 @@
+nanosaur)
+ name="Nanosaur"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit jorio Nanosaur)
+ appNewVersion=$(versionFromGit jorio Nanosaur)
+ expectedTeamID="RVNL7XC27G"
+ ;;
diff --git a/fragments/functions.sh b/fragments/functions.sh
index 9ec7ebe..f5d5137 100644
--- a/fragments/functions.sh
+++ b/fragments/functions.sh
@@ -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')"
if [[ $appversion != "" ]]; then
printlog "found packageID $packageID installed, version $appversion"
+ updateDetected="YES"
return
else
printlog "No version found using packageID $packageID"
@@ -162,7 +163,11 @@ getAppVersion() {
else
applist=$(mdfind "kind:application $appName" -0 )
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} )
@@ -173,6 +178,7 @@ getAppVersion() {
#appversion=$(mdls -name kMDItemVersion -raw $installedAppPath )
appversion=$(defaults read $installedAppPath/Contents/Info.plist $versionKey) #Not dependant on Spotlight indexing
printlog "found app at $installedAppPath, version $appversion"
+ updateDetected="YES"
# Is current app from App Store
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
@@ -342,10 +348,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir
# versioncheck
# credit: Søren Theilgaard (@theilgaard)
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."
if [[ $INSTALL != "force" ]]; then
- message="$name, version $appNewVersion, is the latest version."
+ message="$name, version $appNewVersion, is the latest version."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying"
displaynotification "$message" "No update for $name!"
@@ -369,26 +375,44 @@ installAppWithPath() { # $1: path to app to install in $targetDir
printlog "DEBUG mode 2 enabled, exiting"
cleanupAndExit 0
fi
+
+ # Test if variable CLIInstaller is set
+ if [[ -z $CLIInstaller ]]; then
+
+ # remove existing application
+ if [ -e "$targetDir/$appName" ]; then
+ printlog "Removing existing $targetDir/$appName"
+ rm -Rf "$targetDir/$appName"
+ fi
- # remove existing application
- if [ -e "$targetDir/$appName" ]; then
- printlog "Removing existing $targetDir/$appName"
- rm -Rf "$targetDir/$appName"
- fi
+ # copy app to /Applications
+ printlog "Copy $appPath to $targetDir"
+ if ! ditto "$appPath" "$targetDir/$appName"; then
+ cleanupAndExit 7 "Error while copying"
+ fi
- # copy app to /Applications
- printlog "Copy $appPath to $targetDir"
- if ! ditto "$appPath" "$targetDir/$appName"; then
- cleanupAndExit 7 "Error while copying"
- fi
+ # set ownership to current user
+ if [ "$currentUser" != "loginwindow" ]; then
+ printlog "Changing owner to $currentUser"
+ chown -R "$currentUser" "$targetDir/$appName"
+ else
+ printlog "No user logged in, not changing user"
+ fi
+ elif [[ ! -z $CLIInstaller ]]; then
+ mountname=$(dirname $appPath)
+ printlog "CLIInstaller exists, running installer command $mountname/$CLIInstaller $CLIArguments" #INFO
- # set ownership to current user
- if [ "$currentUser" != "loginwindow" ]; then
- printlog "Changing owner to $currentUser"
- chown -R "$currentUser" "$targetDir/$appName"
- else
- printlog "No user logged in, not changing user"
+ 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
}
@@ -411,7 +435,6 @@ mountDMG() {
installFromDMG() {
mountDMG
-
installAppWithPath "$dmgmount/$appName"
}
@@ -450,7 +473,7 @@ installFromPKG() {
if [[ $appversion == $appNewVersion ]]; then
printlog "Downloaded version of $name is the same as installed."
if [[ $INSTALL != "force" ]]; then
- message="$name, version $appNewVersion, is the latest version."
+ message="$name, version $appNewVersion, is the latest version."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
printlog "notifying"
displaynotification "$message" "No update for $name!"
@@ -598,7 +621,7 @@ runUpdateTool() {
}
finishing() {
- printlog "Finishing…"
+ printlog "Finishing..."
sleep 10 # wait a moment to let spotlight catch up
getAppVersion
@@ -612,7 +635,11 @@ finishing() {
if [[ $currentUser != "loginwindow" && ( $NOTIFY == "success" || $NOTIFY == "all" ) ]]; then
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
}
diff --git a/fragments/header.sh b/fragments/header.sh
index 703773f..c41879d 100644
--- a/fragments/header.sh
+++ b/fragments/header.sh
@@ -166,6 +166,8 @@ REOPEN="yes"
# - archiveName: (optional)
# The name of the downloaded file.
# When not given the archiveName is derived from the $name.
+# Note: This has to be defined BEFORE calling downloadURLFromGit or
+# versionFromGit functions in the label.
#
# - appName: (optional)
# File name of the app bundle in the dmg to verify and copy (include .app).
@@ -198,8 +200,27 @@ REOPEN="yes"
# $updateTool $updateArguments
# Will be run instead of of downloading and installing a complete new version.
# Use this when the updateTool does differential and optimized downloads.
-# e.g. msupdate
+# e.g. msupdate on various Microsoft labels
#
# - updateToolRunAsCurrentUser:
# 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 it’s 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
+#
diff --git a/fragments/labels/adobecreativeclouddesktop.sh b/fragments/labels/adobecreativeclouddesktop.sh
new file mode 100644
index 0000000..7445443
--- /dev/null
+++ b/fragments/labels/adobecreativeclouddesktop.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/airserver.sh b/fragments/labels/airserver.sh
index 8c1ede4..df3310f 100644
--- a/fragments/labels/airserver.sh
+++ b/fragments/labels/airserver.sh
@@ -3,6 +3,6 @@ airserver)
name="AirServer"
type="dmg"
downloadURL="https://www.airserver.com/download/mac/latest"
- #appNewVersion=$() # Cannot find version history or release notes on home page
+ appNewVersion=$(curl -fsIL "${downloadURL}" | grep -i "location" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="6C755KS5W3"
;;
diff --git a/fragments/labels/alephone.sh b/fragments/labels/alephone.sh
new file mode 100644
index 0000000..5ad40a9
--- /dev/null
+++ b/fragments/labels/alephone.sh
@@ -0,0 +1,7 @@
+alephone)
+ name="Aleph One"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit Aleph-One-Marathon alephone)
+ appNewVersion=$(versionFromGit Aleph-One-Marathon alephone)
+ expectedTeamID="E8K89CXZE7"
+ ;;
diff --git a/fragments/labels/apparency.sh b/fragments/labels/apparency.sh
index 6ca5afb..32bf6f9 100644
--- a/fragments/labels/apparency.sh
+++ b/fragments/labels/apparency.sh
@@ -2,5 +2,6 @@ apparency)
name="Apparency"
type="dmg"
downloadURL="https://www.mothersruin.com/software/downloads/Apparency.dmg"
+ appNewVersion=$(curl -fs https://mothersruin.com/software/Apparency/data/ApparencyVersionInfo.plist | grep -A1 CFBundleShortVersionString | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')
expectedTeamID="936EB786NH"
;;
diff --git a/fragments/labels/applesfsymbols.sh b/fragments/labels/applesfsymbols.sh
index 1b0c751..b4f2764 100644
--- a/fragments/labels/applesfsymbols.sh
+++ b/fragments/labels/applesfsymbols.sh
@@ -2,6 +2,7 @@ applesfsymbols|\
sfsymbols)
name="SF Symbols"
type="pkgInDmg"
- downloadURL="https://developer.apple.com/design/downloads/SF-Symbols.dmg"
+ downloadURL=$( curl -fs "https://developer.apple.com/sf-symbols/" | grep -oe "https.*\.dmg" | head -1 )
+ appNewVersion=$( echo "$downloadURL" | head -1 | sed -E 's/.*SF-Symbols-([0-9.]*)\..*/\1/g')
expectedTeamID="Software Update"
;;
diff --git a/fragments/labels/audacity.sh b/fragments/labels/audacity.sh
index 89c17fe..a5868d3 100644
--- a/fragments/labels/audacity.sh
+++ b/fragments/labels/audacity.sh
@@ -1,8 +1,7 @@
audacity)
- # credit: Gabe Marchan (gabemarchan.com - @darklink87)
name="Audacity"
type="dmg"
downloadURL=$(downloadURLFromGit audacity audacity)
appNewVersion=$(versionFromGit audacity audacity)
- expectedTeamID="T3N4JQ7YY6"
+ expectedTeamID="AWEYX923UX"
;;
diff --git a/fragments/labels/bluejeans.sh b/fragments/labels/bluejeans.sh
index d3d878a..9dc77dd 100644
--- a/fragments/labels/bluejeans.sh
+++ b/fragments/labels/bluejeans.sh
@@ -2,7 +2,7 @@ bluejeans)
name="BlueJeans"
type="pkg"
if [[ $(arch) == "arm64" ]]; then
- downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeansInstaller.*arm.*.pkg" )
+ downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeans.*Installer.*arm.*.pkg" )
elif [[ $(arch) == "i386" ]]; then
downloadURL=$(curl -fs "https://www.bluejeans.com/downloads" | xmllint --html --format - 2>/dev/null | grep -o "https://.*BlueJeansInstaller.*x86.*.dmg" | sed 's/dmg/pkg/g')
fi
diff --git a/fragments/labels/bugdom.sh b/fragments/labels/bugdom.sh
new file mode 100644
index 0000000..106b3e5
--- /dev/null
+++ b/fragments/labels/bugdom.sh
@@ -0,0 +1,7 @@
+bugdom)
+ name="Bugdom"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit jorio Bugdom)
+ appNewVersion=$(versionFromGit jorio Bugdom)
+ expectedTeamID="RVNL7XC27G"
+ ;;
diff --git a/fragments/labels/camostudio.sh b/fragments/labels/camostudio.sh
index 71b2646..8006c3b 100644
--- a/fragments/labels/camostudio.sh
+++ b/fragments/labels/camostudio.sh
@@ -1,8 +1,9 @@
camostudio)
- # credit: Søren Theilgaard (@theilgaard)
name="Camo Studio"
type="zip"
downloadURL="https://reincubate.com/res/labs/camo/camo-macos-latest.zip"
- appNewVersion=$(curl -s -L https://reincubate.com/support/camo/release-notes/ | grep -m2 "has-m-t-0" | head -1 | cut -d ">" -f2 | cut -d " " -f1)
+ #appNewVersion=$(curl -s -L https://reincubate.com/support/camo/release-notes/ | grep -m2 "has-m-t-0" | head -1 | cut -d ">" -f2 | cut -d " " -f1)
+ appNewVersion=$( curl -fs "https://uds.reincubate.com/release-notes/camo/" | head -1 | cut -d "," -f3 | grep -o -e "[0-9.]*" )
+ # Camo Studio will ask for admin permissions to install som plug-ins. that has not been handled.
expectedTeamID="Q248YREB53"
;;
diff --git a/fragments/labels/canva.sh b/fragments/labels/canva.sh
new file mode 100644
index 0000000..f399d77
--- /dev/null
+++ b/fragments/labels/canva.sh
@@ -0,0 +1,11 @@
+canva)
+ name="Canva"
+ type="dmg"
+ if [[ $(arch) == "arm64" ]]; then
+ downloadURL=$(curl -fsLI -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "accept-encoding: gzip, deflate, br" -H "accept-language: en-US,en;q=0.9" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "sec-fetch-mode: navigate" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" "https://www.canva.com/download/mac/arm/canva-desktop/" | grep -i "^location" | cut -d " " -f2 | tr -d '\r')
+ elif [[ $(arch) == "i386" ]]; then
+ downloadURL=$(curl -fsLI -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" -H "accept-encoding: gzip, deflate, br" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "accept-language: en-US,en;q=0.9" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-mode: navigate" "https://www.canva.com/download/mac/intel/canva-desktop/" | grep -i "^location" | cut -d " " -f2 | tr -d '\r')
+ fi
+ appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g' )
+ expectedTeamID="5HD2ARTBFS"
+ ;;
diff --git a/fragments/labels/chatwork.sh b/fragments/labels/chatwork.sh
new file mode 100644
index 0000000..f8fb708
--- /dev/null
+++ b/fragments/labels/chatwork.sh
@@ -0,0 +1,6 @@
+chatwork)
+ name="Chatwork"
+ type="dmg"
+ downloadURL="https://desktop-app.chatwork.com/installer/Chatwork.dmg"
+ expectedTeamID="H34A3H2Y54"
+ ;;
diff --git a/fragments/labels/closeio.sh b/fragments/labels/closeio.sh
new file mode 100644
index 0000000..577f0ef
--- /dev/null
+++ b/fragments/labels/closeio.sh
@@ -0,0 +1,7 @@
+closeio)
+ name="Close.io"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit closeio closeio-desktop-releases)
+ appNewVersion=$(versionFromGit closeio closeio-desktop-releases)
+ expectedTeamID="WTNQ6773UC"
+ ;;
diff --git a/fragments/labels/dialog.sh b/fragments/labels/dialog.sh
index 48bba5a..5925db1 100644
--- a/fragments/labels/dialog.sh
+++ b/fragments/labels/dialog.sh
@@ -1,8 +1,8 @@
dialog)
name="Dialog"
type="pkg"
- downloadURL=$(downloadURLFromGit bartreardon Dialog-public )
- appNewVersion=$(versionFromGit bartreardon Dialog-public )
+ packageID="au.csiro.dialogcli"
+ downloadURL="$(downloadURLFromGit bartreardon Dialog)"
+ appNewVersion="$(versionFromGit bartreardon Dialog)"
expectedTeamID="PWA5E9TQ59"
;;
-
\ No newline at end of file
diff --git a/fragments/labels/eshareosx.sh b/fragments/labels/eshareosx.sh
new file mode 100644
index 0000000..d46b9b8
--- /dev/null
+++ b/fragments/labels/eshareosx.sh
@@ -0,0 +1,9 @@
+eshareosx)
+ name="e-Share"
+ type="pkg"
+ packageID="com.ncryptedcloud.e-Share.pkg"
+ downloadURL=https://www.ncryptedcloud.com/static/downloads/osx/$(curl -fs https://www.ncryptedcloud.com/static/downloads/osx/ | grep -o -i "href.*\".*\"" | cut -d '"' -f2)
+ versionKey="CFBundleVersion"
+ appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z\-]*_([0-9.]*)\.pkg/\1/g' )
+ expectedTeamID="X9MBQS7DDC"
+ ;;
diff --git a/fragments/labels/exifrenamer.sh b/fragments/labels/exifrenamer.sh
new file mode 100644
index 0000000..588591b
--- /dev/null
+++ b/fragments/labels/exifrenamer.sh
@@ -0,0 +1,7 @@
+exifrenamer)
+ name="ExifRenamer"
+ type="dmg"
+ downloadURL="https://www.qdev.de/"$(curl -fs "https://www.qdev.de/download.php?file=ExifRenamer.dmg" | grep -o -e "URL=[a-zA-Z/]*.dmg" | cut -d "=" -f2)
+ appNewVersion=$(curl -fs "https://www.qdev.de/?location=downloads" | grep -A1 -m1 "ExifRenamer" | tail -1 | cut -d ">" -f2 | cut -d " " -f1)
+ expectedTeamID="MLF9FE35AM"
+ ;;
diff --git a/fragments/labels/fastscripts.sh b/fragments/labels/fastscripts.sh
new file mode 100644
index 0000000..e75144d
--- /dev/null
+++ b/fragments/labels/fastscripts.sh
@@ -0,0 +1,7 @@
+fastscripts)
+ name="FastScripts"
+ type="zip"
+ downloadURL=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2 )
+ appNewVersion=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2 )
+ expectedTeamID="493CVA9A35"
+ ;;
diff --git a/fragments/labels/findanyfile.sh b/fragments/labels/findanyfile.sh
new file mode 100644
index 0000000..2061ac0
--- /dev/null
+++ b/fragments/labels/findanyfile.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/firefox.sh b/fragments/labels/firefox.sh
index 1983242..5bfdaef 100644
--- a/fragments/labels/firefox.sh
+++ b/fragments/labels/firefox.sh
@@ -2,7 +2,7 @@ firefox)
name="Firefox"
type="dmg"
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
- appNewVersion=$(/usr/bin/curl https://www.mozilla.org/en-US/firefox/releases/ --silent | /usr/bin/grep 'Inkscape" | cut -d '>' -f 3 | cut -d '<' -f 1 | sed 's/[^0-9.]*//g') # Can't figure out where exact new version is found. Currently returns 1.0, but version is "1.0.0 (4035a4f)"
+ downloadURL="https://inkscape.org$(curl -fs https://inkscape.org$(curl -fsJL https://inkscape.org/release/ | grep "/release/" | grep en | head -n 1 | cut -d '"' -f 6)mac-os-x/dmg/dl/ | grep "click here" | cut -d '"' -f 2)"
+ appCustomVersion() { /Applications/Inkscape.app/Contents/MacOS/inkscape --version | cut -d " " -f2 }
+ appNewVersion=$(curl -fsJL https://inkscape.org/release/ | grep "" | grep -o -e "[0-9.]*")
expectedTeamID="SW3D6BB6A6"
;;
diff --git a/fragments/labels/installomator.sh b/fragments/labels/installomator.sh
new file mode 100644
index 0000000..f6d51b0
--- /dev/null
+++ b/fragments/labels/installomator.sh
@@ -0,0 +1,10 @@
+installomator|\
+installomator_theile)
+ name="Installomator"
+ type="pkg"
+ packageID="com.scriptingosx.Installomator"
+ downloadURL=$(downloadURLFromGit Installomator Installomator )
+ appNewVersion=$(versionFromGit Installomator Installomator )
+ expectedTeamID="JME5BW3F3R"
+ blockingProcesses=( NONE )
+ ;;
diff --git a/fragments/labels/installomator_theile.sh b/fragments/labels/installomator_theile.sh
deleted file mode 100644
index e531055..0000000
--- a/fragments/labels/installomator_theile.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-installomator_theile)
- # credit: Søren Theilgaard (@theilgaard)
- name="Installomator"
- type="pkg"
- packageID="dk.theilgaard.pkg.Installomator"
- downloadURL=$(downloadURLFromGit theile Installomator )
- appNewVersion=$(versionFromGit theile Installomator )
- #appCustomVersion(){/usr/local/bin/Installomator.sh version | tail -1 | awk '{print $4}'}
- expectedTeamID="FXW6QXBFW5"
- blockingProcesses=( NONE )
- ;;
diff --git a/fragments/labels/jabradirect.sh b/fragments/labels/jabradirect.sh
index e0b789b..4359ac6 100644
--- a/fragments/labels/jabradirect.sh
+++ b/fragments/labels/jabradirect.sh
@@ -1,7 +1,8 @@
jabradirect)
name="Jabra Direct"
type="pkgInDmg"
+ packageID="com.jabra.directonline"
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"
- 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)
;;
diff --git a/fragments/labels/jetbrainsrubymine.sh b/fragments/labels/jetbrainsrubymine.sh
new file mode 100644
index 0000000..cd140e2
--- /dev/null
+++ b/fragments/labels/jetbrainsrubymine.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/lexarrecoverytool.sh b/fragments/labels/lexarrecoverytool.sh
index 82816e8..f5c9345 100644
--- a/fragments/labels/lexarrecoverytool.sh
+++ b/fragments/labels/lexarrecoverytool.sh
@@ -1,8 +1,6 @@
lexarrecoverytool)
- # credit: Søren Theilgaard (@theilgaard)
name="Lexar Recovery Tool"
type="appInDmgInZip"
- downloadURL="https://www.lexar.com$( curl -fs "https://www.lexar.com/support/downloads/" | grep -i "mac" | grep -i "recovery" | head -1 | tr '"' '\n' | grep -i ".zip" )"
- #appNewVersion=""
+ downloadURL="https://www.lexar.com/wp-content/uploads/product_images/Lexar-Recovery-Tool-Mac.zip"
expectedTeamID="Y8HM6WR2DV"
;;
diff --git a/fragments/labels/logitechoptions.sh b/fragments/labels/logitechoptions.sh
index bcb32a6..48409a0 100644
--- a/fragments/labels/logitechoptions.sh
+++ b/fragments/labels/logitechoptions.sh
@@ -3,7 +3,7 @@ logitechoptions)
name="Logitech Options"
type="pkgInZip"
downloadURL=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}')
- appNewVersion=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}' | sed -E 's/.*_([0-9\.]*)[-\.].*/\1/' )
+ #appNewVersion=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}' | sed -E 's/.*_([0-9\.]*)[-\.].*/\1/' )
pkgName="LogiMgr Installer ${appNewVersion}.app/Contents/Resources/LogiMgr.pkg"
expectedTeamID="QED4VVPZWA"
;;
diff --git a/fragments/labels/logseq.sh b/fragments/labels/logseq.sh
new file mode 100644
index 0000000..d51caff
--- /dev/null
+++ b/fragments/labels/logseq.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/maccyapp.sh b/fragments/labels/maccyapp.sh
new file mode 100644
index 0000000..7ea7be4
--- /dev/null
+++ b/fragments/labels/maccyapp.sh
@@ -0,0 +1,7 @@
+maccyapp)
+ name="Maccy"
+ type="zip"
+ downloadURL="$(downloadURLFromGit p0deje Maccy)"
+ appNewVersion="$(versionFromGit p0deje Maccy)"
+ expectedTeamID="MN3X4648SC"
+ ;;
diff --git a/fragments/labels/macports.sh b/fragments/labels/macports.sh
new file mode 100644
index 0000000..6a473a1
--- /dev/null
+++ b/fragments/labels/macports.sh
@@ -0,0 +1,23 @@
+macports)
+ name="MacPorts"
+ type="pkg"
+ #buildVersion=$(uname -r | cut -d '.' -f 1)
+ case $(uname -r | cut -d '.' -f 1) in
+ 21)
+ archiveName="Monterey.pkg"
+ ;;
+ 20)
+ archiveName="BigSur.pkg"
+ ;;
+ 19)
+ archiveName="Catalina.pkg"
+ ;;
+ *)
+ cleanupAndExit 1 "macOS 10.14 or earlier not supported by Installomator."
+ ;;
+ esac
+ downloadURL=$(downloadURLFromGit macports macports-base)
+ appNewVersion=$(versionFromGit macports macports-base)
+ appCustomVersion(){ if [ -x /opt/local/bin/port ]; then /opt/local/bin/port version | awk '{print $2}'; else "0"; fi }
+ expectedTeamID="QTA3A3B7F3"
+ ;;
diff --git a/fragments/labels/marathon.sh b/fragments/labels/marathon.sh
new file mode 100644
index 0000000..75f5799
--- /dev/null
+++ b/fragments/labels/marathon.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/marathon2.sh b/fragments/labels/marathon2.sh
new file mode 100644
index 0000000..02440fa
--- /dev/null
+++ b/fragments/labels/marathon2.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/marathoninfinity.sh b/fragments/labels/marathoninfinity.sh
new file mode 100644
index 0000000..a9b5165
--- /dev/null
+++ b/fragments/labels/marathoninfinity.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/mattermost.sh b/fragments/labels/mattermost.sh
index 86cd707..532a436 100644
--- a/fragments/labels/mattermost.sh
+++ b/fragments/labels/mattermost.sh
@@ -1,12 +1,9 @@
mattermost)
name="Mattermost"
type="dmg"
- if [[ $(arch) == i386 ]]; then
- archiveName="mac.dmg"
- elif [[ $(arch) == arm64 ]]; then
- archiveName="mac-m1.dmg"
- fi
+ archiveName="mac-universal.dmg"
downloadURL=$(downloadURLFromGit mattermost desktop)
appNewVersion=$(versionFromGit mattermost desktop )
expectedTeamID="UQ8HT4Q2XM"
+ Mattermost Helper (Renderer).app app.asar
;;
diff --git a/fragments/labels/microsoftcompanyportal.sh b/fragments/labels/microsoftcompanyportal.sh
index 0676dc5..a75b495 100644
--- a/fragments/labels/microsoftcompanyportal.sh
+++ b/fragments/labels/microsoftcompanyportal.sh
@@ -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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftdefenderatp.sh b/fragments/labels/microsoftdefenderatp.sh
index 4358408..c73c090 100644
--- a/fragments/labels/microsoftdefenderatp.sh
+++ b/fragments/labels/microsoftdefenderatp.sh
@@ -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/([0-9.]*) .*/\1/')
# No version number in download url
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftedge.sh b/fragments/labels/microsoftedge.sh
index bc40bb3..46f726a 100644
--- a/fragments/labels/microsoftedge.sh
+++ b/fragments/labels/microsoftedge.sh
@@ -1,11 +1,16 @@
microsoftedge|\
-microsoftedgeconsumerstable)
+microsoftedgeconsumerstable|\
+microsoftedgeenterprisestable)
name="Microsoft Edge"
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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftedgeenterprisestable.sh b/fragments/labels/microsoftedgeenterprisestable.sh
deleted file mode 100644
index 1866fb9..0000000
--- a/fragments/labels/microsoftedgeenterprisestable.sh
+++ /dev/null
@@ -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/([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 )
- ;;
diff --git a/fragments/labels/microsoftexcel.sh b/fragments/labels/microsoftexcel.sh
index d1b4f93..a27367e 100644
--- a/fragments/labels/microsoftexcel.sh
+++ b/fragments/labels/microsoftexcel.sh
@@ -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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftoffice365.sh b/fragments/labels/microsoftoffice365.sh
index 1318950..e7de7a7 100644
--- a/fragments/labels/microsoftoffice365.sh
+++ b/fragments/labels/microsoftoffice365.sh
@@ -7,6 +7,10 @@ microsoftoffice365)
expectedTeamID="UBF8T346G9"
# using MS PowerPoint as the 'stand-in' for the entire suite
#appName="Microsoft PowerPoint.app"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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" )
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install )
diff --git a/fragments/labels/microsoftofficebusinesspro.sh b/fragments/labels/microsoftofficebusinesspro.sh
index 48454f8..68f0cdb 100644
--- a/fragments/labels/microsoftofficebusinesspro.sh
+++ b/fragments/labels/microsoftofficebusinesspro.sh
@@ -6,6 +6,10 @@ microsoftofficebusinesspro)
expectedTeamID="UBF8T346G9"
# using MS PowerPoint as the 'stand-in' for the entire suite
appName="Microsoft PowerPoint.app"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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")
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
updateToolArguments=( --install )
diff --git a/fragments/labels/microsoftonedrive.sh b/fragments/labels/microsoftonedrive.sh
index 373b7b3..d7df8d7 100644
--- a/fragments/labels/microsoftonedrive.sh
+++ b/fragments/labels/microsoftonedrive.sh
@@ -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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftonenote.sh b/fragments/labels/microsoftonenote.sh
index d254f6a..cb86c78 100644
--- a/fragments/labels/microsoftonenote.sh
+++ b/fragments/labels/microsoftonenote.sh
@@ -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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftoutlook.sh b/fragments/labels/microsoftoutlook.sh
index e7fe89e..7b4b02c 100644
--- a/fragments/labels/microsoftoutlook.sh
+++ b/fragments/labels/microsoftoutlook.sh
@@ -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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftpowerpoint.sh b/fragments/labels/microsoftpowerpoint.sh
index be1257d..4798a96 100644
--- a/fragments/labels/microsoftpowerpoint.sh
+++ b/fragments/labels/microsoftpowerpoint.sh
@@ -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/([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"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftremotedesktop.sh b/fragments/labels/microsoftremotedesktop.sh
index f2645a9..753ae13 100644
--- a/fragments/labels/microsoftremotedesktop.sh
+++ b/fragments/labels/microsoftremotedesktop.sh
@@ -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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftskypeforbusiness.sh b/fragments/labels/microsoftskypeforbusiness.sh
index 046f3e1..1b2518c 100644
--- a/fragments/labels/microsoftskypeforbusiness.sh
+++ b/fragments/labels/microsoftskypeforbusiness.sh
@@ -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/([0-9.]*)<.*/\1/')
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="UBF8T346G9"
+ if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $DEBUG -eq 0 ]]; 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 )
;;
diff --git a/fragments/labels/microsoftteams.sh b/fragments/labels/microsoftteams.sh
index 475ee5a..d8377aa 100644
--- a/fragments/labels/microsoftteams.sh
+++ b/fragments/labels/microsoftteams.sh
@@ -8,6 +8,6 @@ microsoftteams)
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"
+ # 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 TEAM01 )
;;
diff --git a/fragments/labels/microsoftvisualstudiocode.sh b/fragments/labels/microsoftvisualstudiocode.sh
index 85a4e68..be06f44 100644
--- a/fragments/labels/microsoftvisualstudiocode.sh
+++ b/fragments/labels/microsoftvisualstudiocode.sh
@@ -2,7 +2,6 @@ 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"
diff --git a/fragments/labels/microsoftword.sh b/fragments/labels/microsoftword.sh
index 9b72b39..801fb48 100644
--- a/fragments/labels/microsoftword.sh
+++ b/fragments/labels/microsoftword.sh
@@ -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/([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"
+ 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 )
;;
diff --git a/fragments/labels/microsoftyammer.sh b/fragments/labels/microsoftyammer.sh
index 3c9aa95..2fc47ee 100644
--- a/fragments/labels/microsoftyammer.sh
+++ b/fragments/labels/microsoftyammer.sh
@@ -5,6 +5,6 @@ microsoftyammer)
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.yammer.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/([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"
+ #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 ?????? )
;;
diff --git a/fragments/labels/mowgliiitsycal.sh b/fragments/labels/mowgliiitsycal.sh
new file mode 100644
index 0000000..b4c0ce2
--- /dev/null
+++ b/fragments/labels/mowgliiitsycal.sh
@@ -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"
+ ;;
+
diff --git a/fragments/labels/nudge.sh b/fragments/labels/nudge.sh
new file mode 100644
index 0000000..804872d
--- /dev/null
+++ b/fragments/labels/nudge.sh
@@ -0,0 +1,8 @@
+nudge)
+ name="Nudge"
+ type="pkg"
+ downloadURL=$(downloadURLFromGit macadmins Nudge )
+ appNewVersion=$(versionFromGit macadmins Nudge )
+ expectedTeamID="9GQZ7KUFR6"
+ archiveName="Nudge-[0-9.]*.pkg"
+ ;;
diff --git a/fragments/labels/ottomatic.sh b/fragments/labels/ottomatic.sh
new file mode 100644
index 0000000..f2e1c5a
--- /dev/null
+++ b/fragments/labels/ottomatic.sh
@@ -0,0 +1,8 @@
+ottomatic)
+ name="Otto Matic"
+ type="dmg"
+ downloadURL=$(downloadURLFromGit jorio OttoMatic)
+ appNewVersion=$(versionFromGit jorio OttoMatic)
+ expectedTeamID="RVNL7XC27G"
+ ;;
+
diff --git a/fragments/labels/overflow.sh b/fragments/labels/overflow.sh
new file mode 100644
index 0000000..6ca5eac
--- /dev/null
+++ b/fragments/labels/overflow.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/pandoc.sh b/fragments/labels/pandoc.sh
new file mode 100644
index 0000000..154f4ff
--- /dev/null
+++ b/fragments/labels/pandoc.sh
@@ -0,0 +1,9 @@
+pandoc)
+ name="Pandoc"
+ type="pkg"
+ packageID="net.johnmacfarlane.pandoc"
+ downloadURL=$(downloadURLFromGit jgm pandoc )
+ appNewVersion=$(versionFromGit jgm pandoc )
+ archiveName="mac.pkg"
+ expectedTeamID="5U2WKE6DES"
+ ;;
diff --git a/fragments/labels/protonvpn.sh b/fragments/labels/protonvpn.sh
new file mode 100644
index 0000000..99fb7f9
--- /dev/null
+++ b/fragments/labels/protonvpn.sh
@@ -0,0 +1,7 @@
+protonvpn)
+ name="ProtonVPN"
+ type="dmg"
+ downloadURL=$(curl -fs "https://protonvpn.com/download" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*\.dmg" | head -1)
+ appNewVersion=$(echo $downloadURL | sed -e 's/^.*\/Proton.*_v\([0-9.]*\)\.dmg/\1/g')
+ expectedTeamID="J6S6Q257EK"
+ ;;
diff --git a/fragments/labels/r.sh b/fragments/labels/r.sh
index 3151eba..1c98852 100644
--- a/fragments/labels/r.sh
+++ b/fragments/labels/r.sh
@@ -1,8 +1,7 @@
r)
- # credit: Tadayuki Onishi (@kenchan0130)
name="R"
type="pkg"
- downloadURL=$( curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p' )
- appNewVersion=$(curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p')
+ downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '' | sed -E 's/.+"(.+)".+/\1/g' )"
+ appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
expectedTeamID="VZLD955F6P"
;;
diff --git a/fragments/labels/remotix.sh b/fragments/labels/remotix.sh
new file mode 100644
index 0000000..4a095d3
--- /dev/null
+++ b/fragments/labels/remotix.sh
@@ -0,0 +1,7 @@
+remotix)
+ name="Remotix"
+ type="dmg"
+ downloadURL="https://remotix.com/downloads/latest-remotix-mac/"
+ appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*\.dmg/\1/g' )
+ expectedTeamID="K293Y6CVN4"
+ ;;
diff --git a/fragments/labels/remotixagent.sh b/fragments/labels/remotixagent.sh
new file mode 100644
index 0000000..25539b5
--- /dev/null
+++ b/fragments/labels/remotixagent.sh
@@ -0,0 +1,8 @@
+remotixagent)
+ name="RemotixAgent"
+ type="pkg"
+ packageID="com.nulana.rxagentmac"
+ downloadURL="https://remotix.com/downloads/latest-agent-mac/"
+ appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)-.*\.pkg/\1/g' )
+ expectedTeamID="K293Y6CVN4"
+ ;;
diff --git a/fragments/labels/screencloudplayer.sh b/fragments/labels/screencloudplayer.sh
index 6a19dc5..07bb3bd 100644
--- a/fragments/labels/screencloudplayer.sh
+++ b/fragments/labels/screencloudplayer.sh
@@ -1,7 +1,7 @@
screencloudplayer)
- # credit: AP Orlebeke (@apizz)
name="ScreenCloud Player"
type="dmg"
- downloadURL=$(curl -sL "https://screencloud.com/download" | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p')
+ downloadURL=$(curl -fs "https://screencloud.com/download" | sed -n 's/^.*"url":"\(https.*\.dmg\)".*$/\1/p')
+ appNewVersion=$( echo $downloadURL | sed -e 's/.*\/ScreenCloud.*\-\([0-9.]*\)\.dmg/\1/g' )
expectedTeamID="3C4F953K6P"
;;
diff --git a/fragments/labels/sequelpro.sh b/fragments/labels/sequelpro.sh
new file mode 100644
index 0000000..9e7af69
--- /dev/null
+++ b/fragments/labels/sequelpro.sh
@@ -0,0 +1,7 @@
+sequelpro)
+ name="Sequel Pro"
+ type="dmg"
+ downloadURL="$(downloadURLFromGit sequelpro sequelpro)"
+ appNewVersion="$(versionFromGit sequelpro sequelpro)"
+ expectedTeamID="Media"
+ ;;
diff --git a/fragments/labels/sketchupviewer.sh b/fragments/labels/sketchupviewer.sh
new file mode 100644
index 0000000..6148d3b
--- /dev/null
+++ b/fragments/labels/sketchupviewer.sh
@@ -0,0 +1,6 @@
+sketchupviewer)
+ name="SketchUpViewer"
+ type="dmg"
+ downloadURL="$(curl -fs https://www.sketchup.com/sketchup/SketchUpViewer-en-dmg | grep "/dev/null | head -1 | cut -d '"' -f 2)
+ appNewVersion=$(curl -fs "https://updates.expandrive.com/appcast/strongsync.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:version)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
+ versionKey="CFBundleVersion"
+ expectedTeamID="CH86M498V4"
+ ;;
diff --git a/fragments/labels/superhuman.sh b/fragments/labels/superhuman.sh
new file mode 100644
index 0000000..f64f8b8
--- /dev/null
+++ b/fragments/labels/superhuman.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/talkdeskcallbar.sh b/fragments/labels/talkdeskcallbar.sh
new file mode 100644
index 0000000..9487d44
--- /dev/null
+++ b/fragments/labels/talkdeskcallbar.sh
@@ -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"
+ ;;
diff --git a/fragments/labels/typora.sh b/fragments/labels/typora.sh
new file mode 100644
index 0000000..380843f
--- /dev/null
+++ b/fragments/labels/typora.sh
@@ -0,0 +1,9 @@
+typora)
+ name="Typora"
+ type="dmg"
+ #downloadURL="https://www.typora.io/download/Typora.dmg"
+ downloadURL=$(curl -fs "https://www.typora.io/download/dev_update.xml" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2)
+ #appNewVersion="$(curl -fs "https://www.typora.io/dev_release.html" | grep -o -i "h4>[0-9.]*([0-9.]*)<\/h4.*/\1/')"
+ appNewVersion=$(curl -fs "https://www.typora.io/download/dev_update.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2)
+ expectedTeamID="9HWK5273G4"
+ ;;
diff --git a/fragments/labels/vagrant.sh b/fragments/labels/vagrant.sh
index a69e352..1e8bd8b 100644
--- a/fragments/labels/vagrant.sh
+++ b/fragments/labels/vagrant.sh
@@ -1,10 +1,8 @@
vagrant)
- # credit: AP Orlebeke (@apizz)
name="Vagrant"
type="pkgInDmg"
pkgName="vagrant.pkg"
- downloadURL=$(curl -fs https://www.vagrantup.com/downloads | tr '><' '\n' | awk -F'"' '/x86_64.dmg/ {print $6}' | head -1)
- #appNewVersion=$( curl -fs https://www.vagrantup.com/downloads.html | grep -i "Current Version" )
- appNewVersion=$(versionFromGit hashicorp vagrant)
+ downloadURL=$(curl -fs "https://www.vagrantup.com/downloads" | tr '"' '\n' | grep "^https.*\.dmg$" | head -1)
+ appNewVersion=$( echo $downloadURL | cut -d "/" -f5 )
expectedTeamID="D38WU7D763"
;;
diff --git a/fragments/labels/vscodium.sh b/fragments/labels/vscodium.sh
index 4d83db1..013139b 100644
--- a/fragments/labels/vscodium.sh
+++ b/fragments/labels/vscodium.sh
@@ -1,11 +1,8 @@
vscodium)
- # credit: AP Orlebeke (@apizz)
name="VSCodium"
type="dmg"
- downloadURL=$(curl -fs "https://api.github.com/repos/VSCodium/vscodium/releases/latest" | awk -F '"' "/browser_download_url/ && /dmg/ && ! /sig/ && ! /CLI/ && ! /sha256/ { print \$4 }")
- #downloadURL=$(downloadURLFromGit VSCodium vscodium) # Too many versions
- appNewVersion=$(versionFromGit VSCodium vscodium)
+ downloadURL="$(downloadURLFromGit VSCodium vscodium)"
+ appNewVersion="$(versionFromGit VSCodium vscodium)"
expectedTeamID="C7S3ZQ2B8V"
- appName="VSCodium.app"
blockingProcesses=( Electron )
;;
diff --git a/fragments/labels/wacomdrivers.sh b/fragments/labels/wacomdrivers.sh
new file mode 100644
index 0000000..32098be
--- /dev/null
+++ b/fragments/labels/wacomdrivers.sh
@@ -0,0 +1,8 @@
+wacomdrivers)
+ name="Wacom Desktop Center"
+ type="pkgInDmg"
+ downloadURL="$(curl -fs https://www.wacom.com/en-us/support/product-support/drivers | grep -e "drivers/mac/professional.*dmg" | head -1 | sed -e 's/data-download-link="//g' -e 's/"//' | awk '{$1=$1}{ print }' | sed 's/\r//')"
+ expectedTeamID="EG27766DY7"
+ pkgName="Install Wacom Tablet.pkg"
+ appNewVersion="$(curl -fs https://www.wacom.com/en-us/support/product-support/drivers | grep mac/professional/releasenotes | head -1 | awk -F"|" '{print $1}' | awk -F"Driver" '{print $3}' | sed -e 's/ (.*//g' | tr -d ' ')"
+ ;;
diff --git a/fragments/labels/xink.sh b/fragments/labels/xink.sh
index 62b7fa2..ee3a39d 100644
--- a/fragments/labels/xink.sh
+++ b/fragments/labels/xink.sh
@@ -1,7 +1,8 @@
xink)
name="Xink"
- type="zip"
- downloadURL="https://downloads.xink.io/macos/client"
- #appNewVersion=$() # Cannot find version history or release notes on home page
+ type="pkg"
+ packageID="com.emailsignature.Xink"
+ downloadURL="https://downloads.xink.io/macos/pkg"
+ appNewVersion=$(curl -fs "https://downloads.xink.io/macos/appcast" | xpath '(//rss/channel/item/enclosure/@sparkle:version)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
expectedTeamID="F287823HVS"
;;
diff --git a/fragments/labels/zohoworkdrivetruesync.sh b/fragments/labels/zohoworkdrivetruesync.sh
new file mode 100644
index 0000000..aa0820e
--- /dev/null
+++ b/fragments/labels/zohoworkdrivetruesync.sh
@@ -0,0 +1,11 @@
+zohoworkdrivetruesync)
+# Using this label expects you to agree to these:
+# License Areemant: https://www.zoho.com/workdrive/zohoworkdrive-license-agreement.html
+# Privacy policy: https://www.zoho.com/privacy.html
+ name="Zoho WorkDrive TrueSync"
+ type="pkg"
+ #https://www.zoho.com/workdrive/truesync.html
+ #https://files-accl.zohopublic.com/public/tsbin/download/c488f53fb0fe339a8a3868a16d56ede6
+ downloadURL=$(curl -fs "https://www.zoho.com/workdrive/truesync.html" | tr '<' '\n' | grep -B3 "For Mac" | grep -o -m1 "https.*\"" | cut -d '"' -f1)
+ expectedTeamID="TZ824L8Y37"
+ ;;
diff --git a/fragments/main.sh b/fragments/main.sh
index 51f9c9f..493e2f7 100644
--- a/fragments/main.sh
+++ b/fragments/main.sh
@@ -117,6 +117,10 @@ printlog "appversion: $appversion"
# MARK: Exit if new version is the same as installed version (appNewVersion specified)
# credit: Søren Theilgaard (@theilgaard)
+if [[ $INSTALL == "force" ]]; then
+ printlog "Using force to install, so not using updateTool."
+ updateTool=""
+fi
if [[ -n $appNewVersion ]]; then
printlog "Latest version of $name is $appNewVersion"
if [[ $appversion == $appNewVersion ]]; then
@@ -129,9 +133,6 @@ if [[ -n $appNewVersion ]]; then
displaynotification "$message" "No update for $name!"
fi
cleanupAndExit 0 "No newer version."
- else
- printlog "Using force to install anyway. Not using updateTool."
- updateTool=""
fi
else
printlog "DEBUG mode 1 enabled, not exiting, but there is no new version of app."
@@ -139,10 +140,6 @@ if [[ -n $appNewVersion ]]; then
fi
else
printlog "Latest version not specified."
- if [[ $INSTALL == "force" ]]; then
- printlog "Using force to install, so not using updateTool."
- updateTool=""
- fi
fi
# MARK: check if this is an Update and we can use updateTool
@@ -169,14 +166,22 @@ else
printlog "Downloading $downloadURL to $archiveName"
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
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
if ! curl --location --fail --silent "$downloadURL" -o "$archiveName"; then
printlog "error downloading $downloadURL"
message="$name update/installation failed. This will be logged, so IT can follow up."
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
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
cleanupAndExit 2
fi
@@ -199,7 +204,17 @@ fi
printlog "Installing $name"
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
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
case $type in
diff --git a/fragments/version.sh b/fragments/version.sh
index a3df0a6..b3db12c 100644
--- a/fragments/version.sh
+++ b/fragments/version.sh
@@ -1 +1 @@
-0.8.0
+9.0dev
diff --git a/utils/buildLabel.sh b/utils/buildLabel.sh
index e64f81e..6d74380 100755
--- a/utils/buildLabel.sh
+++ b/utils/buildLabel.sh
@@ -10,6 +10,94 @@ downloadURL=${1?:"need to provide a download URL."}
# Usage
# ./buildLabel.sh
+# Mark: Functions
+
+xpath() {
+ # the xpath tool changes in Big Sur and now requires the `-e` option
+ if [[ $(sw_vers -buildVersion) > "20A" ]]; then
+ /usr/bin/xpath -e $@
+ # alternative: switch to xmllint (which is not perl)
+ #xmllint --xpath $@ -
+ else
+ /usr/bin/xpath $@
+ fi
+}
+# will get the latest release download from a github repo
+downloadURLFromGit() { # $1 git user name, $2 git repo name
+ gitusername=${1?:"no git user name"}
+ gitreponame=${2?:"no git repo name"}
+
+ if [[ $type == "pkgInDmg" ]]; then
+ filetype="dmg"
+ elif [[ $type == "pkgInZip" ]]; then
+ filetype="zip"
+ else
+ filetype=$type
+ fi
+
+ if [ -n "$archiveDestinationName" ]; then
+ downloadURL=$(curl -sf "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }")
+ else
+ downloadURL=$(curl -sf "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | awk -F '"' "/browser_download_url/ && /$filetype\"/ { print \$4; exit }")
+ fi
+
+ echo "$downloadURL"
+ return 0
+}
+versionFromGit() {
+ # $1 git user name, $2 git repo name
+ gitusername=${1?:"no git user name"}
+ gitreponame=${2?:"no git repo name"}
+
+ appNewVersion=$(curl --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | grep tag_name | cut -d '"' -f 4 | sed 's/[^0-9\.]//g')
+ if [ -z "$appNewVersion" ]; then
+ printlog "could not retrieve version number for $gitusername/$gitreponame"
+ appNewVersion=""
+ else
+ echo "$appNewVersion"
+ return 0
+ fi
+}
+
+pkgInvestigation() {
+ echo "Package investigation."
+ teamID=$(spctl -a -vv -t install "$pkgPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
+ if [[ -z $teamID ]]; then
+ echo "Error verifying PKG: $pkgPath"
+ echo "No TeamID found."
+ exit 4
+ fi
+ echo "Team ID found for PKG: $teamID"
+
+ echo "For PKGs it's advised to find packageID for version checking, so extracting those"
+ pkgutil --expand "$pkgPath" "$archiveName"_pkg
+ if [[ -a "$archiveName"_pkg/Distribution ]] ; then
+ cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null
+ packageID="$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | tr ' ' '\n' | grep -i "id" | cut -d \" -f 2)"
+ elif [[ -a "$archiveName"_pkg/PackageInfo ]] ; then
+ cat "$archiveName"_pkg/PackageInfo | xpath '//pkg-info/@version' 2>/dev/null
+ packageID="$(cat "$archiveName"_pkg/PackageInfo | xpath '//pkg-info/@identifier' 2>/dev/null | cut -d '"' -f2 )"
+ fi
+ rm -r "$archiveName"_pkg
+ echo "$packageID"
+ echo "Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed."
+}
+appInvestigation() {
+ appName=${appPath##*/}
+ name=${appName%.*}
+ echo "Application investigation."
+
+ # verify with spctl
+ teamID=$(spctl -a -vv "$appPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
+ if [[ -z $teamID ]]; then
+ echo "Error verifying app: $appPath"
+ echo "No TeamID found."
+ exit 4
+ fi
+ echo "Team ID found for app: $teamID"
+}
+
+# Mark: Code
# Use working directory as download folder
tmpDir="$(pwd)/$(date "+%Y-%m-%d-%H-%M-%S")"
# Create a n almost unique folder name
@@ -23,57 +111,48 @@ if ! cd "$tmpDir"; then
fi
echo "Working dir: $(pwd)"
-# download the URL
+# investigate and download the URL
echo "Downloading $downloadURL"
-echo "Redirecting to (maybe this can help us with version):\n$(curl -fsIL "$downloadURL" | grep -i ^location)"
+echo $(basename $downloadURL)
+# First trying to find redirection headers on the download, as those can contain version numbers
+echo "Redirecting to (maybe this can help us with version):\n$(curl -fsIL -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" -H "accept-encoding: gzip, deflate, br" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "accept-language: en-US,en;q=0.9" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-mode: navigate" "$downloadURL" | grep -i "^[location|x\-amz\-meta\-version]*")"
+# Now downloading without extra headers
if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then
- echo "error downloading $downloadURL"
- exit 2
+ echo "error downloading $downloadURL using standard headers."
+ echo "result: $downloadOut"
+ echo "Trying all headers…" # that I know of
+ if ! downloadOut="$(curl -fL -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" -H "accept-encoding: gzip, deflate, br" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "accept-language: en-US,en;q=0.9" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-mode: navigate" "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then
+ # we are only here if the download failed
+ echo "error downloading $downloadURL using all headers."
+ echo "result: $downloadOut"
+ # Sometimes a server will give some results to the downloaded output
+ if [[ -n $downloadOut ]]; then
+ echo "Trying output of this…"
+ downloadURL="$(echo $downloadOut | tail -1)"
+ # Last chance for succes on this download
+ if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then
+ echo "error downloading $downloadURL using previous output."
+ echo "result: $downloadOut"
+ echo "No more tries. Cannot continue."
+ exit 1
+ fi
+ fi
+ fi
fi
-xpath() {
- # the xpath tool changes in Big Sur and now requires the `-e` option
- if [[ $(sw_vers -buildVersion) > "20A" ]]; then
- /usr/bin/xpath -e $@
- # alternative: switch to xmllint (which is not perl)
- #xmllint --xpath $@ -
- else
- /usr/bin/xpath $@
- fi
-}
+# Now we have downloaded the archive, and we need to analyze this
+# The download have returned both {filename_effective} and {url_effective}
-pkgInvestigation() {
- echo "Package found"
- teamID=$(spctl -a -vv -t install "$archiveName" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' )
- echo "For PKGs it's advised to find packageID for version checking"
-
- pkgutil --expand "$pkgPath" "$archiveName"_pkg
- cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null
- packageID="$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | tr ' ' '\n' | grep -i "id" | cut -d \" -f 2)"
- rm -r "$archiveName"_pkg
- echo "$packageID"
- echo "Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed."
-}
-appInvestigation() {
- appName=${appPath##*/}
-
- # verify with spctl
- echo "Verifying: $appPath"
- if ! teamID=$(spctl -a -vv "$appPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then
- echo "Error verifying $appPath"
- exit 4
- fi
-}
-
-#echo "downloadOut:\n${downloadOut}"
archiveTempName=$( echo "${downloadOut}" | head -1 )
echo "archiveTempName: $archiveTempName"
archivePath=$( echo "${downloadOut}" | tail -1 )
echo "archivePath: $archivePath"
+# The two fields retuurned can be exchanged, so some servers return the filename on the other variable. Don't know why.
+# So we want to investigate which one has the filename
try1archiveName=${${archiveTempName##*/}%%\?*}
try2archiveName=${${archivePath##*/}%%\?*}
-fileName_re='^([a-zA-Z0-9\_.%-]*)\.(dmg|pkg|zip|tbz)$'
+fileName_re='^([a-zA-Z0-9\_.%-]*)\.(dmg|pkg|zip|tbz)$' # regular expression for matching
if [[ "${try1archiveName}" =~ $fileName_re ]]; then
archiveName=${try1archiveName}
elif [[ "${try2archiveName}" =~ $fileName_re ]]; then
@@ -81,22 +160,26 @@ elif [[ "${try2archiveName}" =~ $fileName_re ]]; then
else
echo "Could not determine archiveName from “$try1archiveName” and “$try2archiveName”"
#echo "Extensions $archiveTempName:t:e $archivePath:t:e"
- exit
+ exit 1
fi
+# So we found a filename, and now we want to detect the extension and other information
echo "Calculated archiveName: $archiveName"
mv $archiveTempName $archiveName
name=${archiveName%.*}
echo "name: $name"
archiveExt=${archiveName##*.}
+type=$archiveExt
echo "archiveExt: $archiveExt"
-identifier=${name:l}
-identifier=${identifier//\%[0-9a-fA-F][0-9a-fA-F]}
-identifier=${identifier//[,._*@$\(\)\-]}
+identifier=${name:l} # making lower case
+identifier=${identifier//\%[0-9a-fA-F][0-9a-fA-F]} # removing certain characters
+identifier=${identifier//[,._*@$\(\)\-]} # removing more characters from label name
echo "identifier: $identifier"
+# Now figuring out the filename extension and handling those situations
if [ "$archiveExt" = "pkg" ]; then
pkgPath="$archiveName"
+ echo "PKG found: $pkgPath"
pkgInvestigation
elif [ "$archiveExt" = "dmg" ]; then
echo "Diskimage found"
@@ -108,15 +191,20 @@ elif [ "$archiveExt" = "dmg" ]; then
fi
echo "Mounted: $dmgmount"
- # check if app og pkg exists
+ # check if app og pkg exists on disk image
appPath=$(find "$dmgmount" -name "*.app" -maxdepth 1 -print )
pkgPath=$(find "$dmgmount" -name "*.pkg" -maxdepth 1 -print )
if [[ $appPath != "" ]]; then
+ echo "App found: $appPath"
appInvestigation
elif [[ $pkgPath != "" ]]; then
+ echo "PKG found: $pkgPath"
archiveExt="pkgInDmg"
pkgInvestigation
+ else
+ echo "Nothing found on DMG."
+ exit 9
fi
hdiutil detach "$dmgmount"
@@ -125,43 +213,141 @@ elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then
# unzip the archive
tar -xf "$archiveName"
- # check if app og pkg exists
+ # check if app og pkg exists after expanding
appPath=$(find "$tmpDir" -name "*.app" -maxdepth 2 -print )
pkgPath=$(find "$tmpDir" -name "*.pkg" -maxdepth 2 -print )
if [[ $appPath != "" ]]; then
+ echo "App found: $appPath"
appInvestigation
elif [[ $pkgPath != "" ]]; then
+ echo "PKG found: $pkgPath"
archiveExt="pkgInZip"
pkgInvestigation
+ else
+ echo "Nothing found in compressed archive."
+ exit 9
fi
fi
-echo
-echo "**********"
-echo
-echo "Labels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed."
-echo
-echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, sometimes as part of the download redirects, but also on a web page. See redirect and archivePath above if link contains information about this. That is a good place to start"
-echo
-echo "$identifier)"
+# github-part to figure out if we can find author and repo, to use our github functions for the label
+if echo "$downloadURL" | grep -i "github.com.*releases/download"; then
+ echo "\n**********\n\nFound GitHub path"
+ githubAuthor=$(echo "$downloadURL" | cut -d "/" -f4)
+ githubRepo=$(echo "$downloadURL" | cut -d "/" -f5)
+ if [[ ! -z $githubAuthor && $githubRepo ]] ; then
+ githubError=9
+ echo "Github place: $githubAuthor $githubRepo"
+ originalDownloadURL="$downloadURL"
+ githubDownloadURL=$(downloadURLFromGit "$githubAuthor" "$githubRepo")
+ githubAppNewVersion=$(versionFromGit "$githubAuthor" "$githubRepo")
+ downloadURL=$originalDownloadURL
+ echo "Latest URL on github: $githubDownloadURL \nLatest version: $githubAppNewVersion"
+ if [[ "$originalDownloadURL" == "$githubDownloadURL" ]]; then
+ echo "GitHub calculated URL matches entered URL."
+ githubError=0
+ downloadURL="\$(downloadURLFromGit $githubAuthor $githubRepo)"
+ appNewVersion="\$(versionFromGit $githubAuthor $githubRepo)"
+ else
+ if [[ "$( echo $originalDownloadURL | cut -d "/" -f1-7)" == "$( echo $githubDownloadURL | cut -d "/" -f1-7)" ]]; then
+ echo "Calculated GitHub URL almost identical, only this diff:"
+ echo "“$( echo $originalDownloadURL | cut -d "/" -f8-)” and “$( echo $githubDownloadURL | cut -d "/" -f8-)”"
+ echo "Could be version difference or difference in archiveName for a given release."
+ echo "Testing for version difference."
+ #Investigate if these strings match if numbers are removed.
+ if [[ "$( echo $originalDownloadURL | cut -d "/" -f8- | sed 's/[0-9.]*//g')" == "$( echo $githubDownloadURL | cut -d "/" -f8- | sed 's/[0-9.]*//g')" ]]; then
+ # In this if..then we found out if the end parts of the URL was mathing after removinger numbers and dots (and then assuming that only a version was different
+ echo "“$( echo $originalDownloadURL | cut -d "/" -f8- | sed 's/[0-9.]*//g')” and “$( echo $githubDownloadURL | cut -d "/" -f8- | sed 's/[0-9.]*//g')”"
+ echo "Matching without numbers in string.\nVERY LIKELY a version difference."
+ githubError=1
+ echo "Try running again with URL: ${githubDownloadURL}"
+ else
+ # If we are here more than numbers and dots didn't match, so maybe this repo has software for several software titles
+ echo "Not a version problem.\nTesting for difference in archiveName."
+ tempName=$(echo ${archiveName%.*} | grep -o "[0-9.]*" )
+ # if archiveName contains several sections of numbers and/or dots, like "Marathon2-20210408-Mac.dmg" that will return 2 and 20210408 so we want to find the longest of these two (or more), assuming that the longest is the version
+ tempName=( $tempName ) # make it an array
+ i=0; max=0; tempString=""
+ echo $tempName | while read tempLine; do
+ ((i++))
+ length[$i]=${#tempLine}
+ if [[ $max -lt $length[$i] ]] ; then
+ max=$length[$i]
+ tempString=$tempLine
+ fi
+ done
+ # Now tempString will have the longest string returned before. So I use that in a search-replace to remove that part and insert regular expression "[0-9.]*" instead as that will match the removed part
+ archiveDestinationName="$(echo $archiveName | sed -E "s/^(.*)$tempString(.*)$/\1[0-9.]*\2/g")"
+ echo "archiveName=\"$archiveDestinationName\""
+ # Now we want to test if the archiveName is working
+ githubDownloadURL=$(downloadURLFromGit "$githubAuthor" "$githubRepo")
+ githubAppNewVersion=$(versionFromGit "$githubAuthor" "$githubRepo")
+ downloadURL=$originalDownloadURL
+ echo "Latest URL on github: $githubDownloadURL \nLatest version: $githubAppNewVersion"
+ # Final evaluation of our result
+ if [[ "$originalDownloadURL" == "$githubDownloadURL" ]]; then
+ echo "GitHub calculated URL matches entered URL."
+ githubError=0
+ downloadURL="\$(downloadURLFromGit $githubAuthor $githubRepo)"
+ appNewVersion="\$(versionFromGit $githubAuthor $githubRepo)"
+ else
+ githubError=2
+ echo "Not solved by using archiveName."
+ echo "Not sure what this can be."
+ archiveDestinationName=""
+ fi
+ fi
+ else
+ echo "GitHub URL not matching"
+ fi
+ fi
+ fi
+fi
+
+# We are finished downloading and analyzing, so now we need to present the data
+echo "\n**********"
+echo "\nLabels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed."
+
+if [[ -z $githubError || $githubError != 0 ]]; then
+echo "\nappNewVersion is often difficult to find. Can sometimes be found in the filename, sometimes as part of the download redirects, but also on a web page. See redirect and archivePath above if link contains information about this. That is a good place to start"
+fi
+
+# Here the label is built, for easy copy and paste
+echo "\n$identifier)"
echo " name=\"$name\""
echo " type=\"$archiveExt\""
-if [ "$packageID" != "" ]; then
+if [ -n "$packageID" ]; then
echo " packageID=\"$packageID\""
fi
+if [ -n "$archiveDestinationName" ]; then
+echo " archiveName=\"$archiveDestinationName\""
+fi
echo " downloadURL=\"$downloadURL\""
-echo " appNewVersion=\"\""
+echo " appNewVersion=\"$appNewVersion\""
echo " expectedTeamID=\"$teamID\""
if [ -n "$appName" ] && [ "$appName" != "${name}.app" ]; then
echo " appName=\"$appName\""
fi
echo " ;;"
-echo
-echo "Above should be saved in a file with exact same name as label, and given extension “.sh”."
-echo "Put this file in folder “fragments/labels”."
-echo
+case $githubError in
+0)
+ echo "\nLabel converted to GitHub label without errors."
+ echo "Details can be seen above."
+ ;;
+1)
+ echo "\nFound Github place in this URL: $githubAuthor $githubRepo"
+ echo "But version has a problem."
+ echo "Try running again with URL: ${githubDownloadURL}"
+ echo "See details above."
+ ;;
+2)
+ echo "\nFound Github place in this URL: $githubAuthor $githubRepo"
+ echo "But it could not be resolved."
+ echo "Can be from a hidden repository, or the software title has a number in it."
+ ;;
+esac
-exit 0
+echo "\nAbove should be saved in a file with exact same name as label, and given extension “.sh”."
+echo "Put this file in folder “fragments/labels”.\n"
diff --git a/utils/checkLabels.sh b/utils/checkLabels.sh
index 4dde7c6..f9fdef1 100755
--- a/utils/checkLabels.sh
+++ b/utils/checkLabels.sh
@@ -16,14 +16,14 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
# MARK: Constants
-pathToLabels="fragments/labels"
-if [[ ! -d ${pathToLabels} ]]; then
- echo "This script should be called from Installomator directory as working directory with this command:"
- echo "utils/checkLabels.sh"
- echo
- exit 99
-fi
+#setup some folders
+script_dir=$(dirname ${0:A})
+repo_dir=$(dirname $script_dir)
+build_dir="$repo_dir/build"
+destination_file="$build_dir/Installomator.sh"
+fragments_dir="$repo_dir/fragments"
+labels_dir="$fragments_dir/labels"
# MARK: Check minimal macOS requirement
if [[ $(sw_vers -buildVersion ) < "18" ]]; then
@@ -98,11 +98,11 @@ BLUE='\033[1;34m'
NC='\033[0m' # No Color
# Labels with the $(arch) call for different versions for Intel and Apple Silicon should be listed here:
-archLabels=( $(grep "\$(arch)" ${pathToLabels}/* | awk '{print $1}' | sed -E 's/.*\/([a-z0-9\_-]*)\..*/\1/g'| uniq ) )
+archLabels=( $(grep "\$(arch)" ${labels_dir}/* | awk '{print $1}' | sed -E 's/.*\/([a-z0-9\_-]*)\..*/\1/g'| uniq ) )
echo "${BLUE}Labels with \"\$(arch)\" call:${NC}\n${archLabels}\n"
if [[ $# -eq 0 ]]; then
- allLabels=( $(grep -h -E '^([a-z0-9\_-]*)(\)|\|\\)$' ${pathToLabels}/*.sh | tr -d ')|\\' | sort) )
+ allLabels=( $(grep -h -E '^([a-z0-9\_-]*)(\)|\|\\)$' ${labels_dir}/*.sh | tr -d ')|\\' | sort) )
else
allLabels=( ${=@} )
fi
@@ -122,7 +122,7 @@ for label in $allLabels; do
name=""; type=""; downloadURL=""; appNewVersion=""; expectedTeamID=""; blockingProcesses=""; updateTool=""; updateToolArguments=""; archiveName=""
#caseLabel
- if cat "${pathToLabels}/${label}.sh" | grep -v -E '^[a-z0-9\_-]*(\)|\|\\)$' | grep -v ";;" > checkLabelCurrent.sh; then
+ if cat "${labels_dir}/${label}.sh" | grep -v -E '^[a-z0-9\_-]*(\)|\|\\)$' | grep -v ";;" > checkLabelCurrent.sh; then
source checkLabelCurrent.sh
echo "Name: $name"