mirror of
https://github.com/mtan93/Installomator.git
synced 2026-03-08 05:31:53 +00:00
Merge branch 'dev' into dev
This commit is contained in:
14
CHANGELOG.md
14
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
|
## v0.7
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,30 @@
|
|||||||
# Contributing to Installomator
|
# 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.
|
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
|
## 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.
|
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.
|
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
|
## Issues
|
||||||
|
|||||||
629
Installomator.sh
629
Installomator.sh
File diff suppressed because it is too large
Load Diff
37
Labels.txt
37
Labels.txt
@@ -4,6 +4,7 @@
|
|||||||
abstract
|
abstract
|
||||||
adobebrackets
|
adobebrackets
|
||||||
adobeconnect
|
adobeconnect
|
||||||
|
adobecreativeclouddesktop
|
||||||
adobereaderdc
|
adobereaderdc
|
||||||
adobereaderdc-install
|
adobereaderdc-install
|
||||||
adobereaderdc-update
|
adobereaderdc-update
|
||||||
@@ -11,6 +12,7 @@ aircall
|
|||||||
airserver
|
airserver
|
||||||
airtame
|
airtame
|
||||||
aldente
|
aldente
|
||||||
|
alephone
|
||||||
alfred
|
alfred
|
||||||
alttab
|
alttab
|
||||||
amazonchime
|
amazonchime
|
||||||
@@ -49,15 +51,19 @@ boxdrive
|
|||||||
boxsync
|
boxsync
|
||||||
boxtools
|
boxtools
|
||||||
brave
|
brave
|
||||||
|
bugdom
|
||||||
caffeine
|
caffeine
|
||||||
cakebrew
|
cakebrew
|
||||||
calibre
|
calibre
|
||||||
camostudio
|
camostudio
|
||||||
camtasia
|
camtasia
|
||||||
|
canva
|
||||||
|
chatwork
|
||||||
cisdem-documentreader
|
cisdem-documentreader
|
||||||
citrixworkspace
|
citrixworkspace
|
||||||
clevershare2
|
clevershare2
|
||||||
clickshare
|
clickshare
|
||||||
|
closeio
|
||||||
cloudya
|
cloudya
|
||||||
code42
|
code42
|
||||||
coderunner
|
coderunner
|
||||||
@@ -76,6 +82,7 @@ desktoppr
|
|||||||
detectxswift
|
detectxswift
|
||||||
devonthink
|
devonthink
|
||||||
dialog
|
dialog
|
||||||
|
dialpad
|
||||||
discord
|
discord
|
||||||
docker
|
docker
|
||||||
drift
|
drift
|
||||||
@@ -84,13 +91,17 @@ easeusdatarecoverywizard
|
|||||||
egnyte
|
egnyte
|
||||||
element
|
element
|
||||||
eraseinstall
|
eraseinstall
|
||||||
|
eshareosx
|
||||||
etrecheck
|
etrecheck
|
||||||
evernote
|
evernote
|
||||||
exelbanstats
|
exelbanstats
|
||||||
|
exifrenamer
|
||||||
fantastical
|
fantastical
|
||||||
|
fastscripts
|
||||||
favro
|
favro
|
||||||
ferdi
|
ferdi
|
||||||
figma
|
figma
|
||||||
|
findanyfile
|
||||||
firefox
|
firefox
|
||||||
firefox_da
|
firefox_da
|
||||||
firefox_intl
|
firefox_intl
|
||||||
@@ -129,6 +140,7 @@ icons
|
|||||||
imazingprofileeditor
|
imazingprofileeditor
|
||||||
inkscape
|
inkscape
|
||||||
insomnia
|
insomnia
|
||||||
|
installomator
|
||||||
installomator_theile
|
installomator_theile
|
||||||
intellijideace
|
intellijideace
|
||||||
istatmenus
|
istatmenus
|
||||||
@@ -146,6 +158,7 @@ jetbrainsintellijideace
|
|||||||
jetbrainsphpstorm
|
jetbrainsphpstorm
|
||||||
jetbrainspycharm
|
jetbrainspycharm
|
||||||
jetbrainspycharmce
|
jetbrainspycharmce
|
||||||
|
jetbrainsrubymine
|
||||||
jetbrainstoolbox
|
jetbrainstoolbox
|
||||||
jetbrainswebstorm
|
jetbrainswebstorm
|
||||||
karabinerelements
|
karabinerelements
|
||||||
@@ -162,11 +175,17 @@ launchbar
|
|||||||
lexarrecoverytool
|
lexarrecoverytool
|
||||||
libreoffice
|
libreoffice
|
||||||
logitechoptions
|
logitechoptions
|
||||||
|
logseq
|
||||||
loom
|
loom
|
||||||
lucifer
|
lucifer
|
||||||
lulu
|
lulu
|
||||||
|
maccyapp
|
||||||
macfuse
|
macfuse
|
||||||
|
macports
|
||||||
malwarebytes
|
malwarebytes
|
||||||
|
marathon
|
||||||
|
marathon2
|
||||||
|
marathoninfinity
|
||||||
mattermost
|
mattermost
|
||||||
menumeters
|
menumeters
|
||||||
microsoftautoupdate
|
microsoftautoupdate
|
||||||
@@ -193,6 +212,7 @@ microsoftword
|
|||||||
microsoftyammer
|
microsoftyammer
|
||||||
miro
|
miro
|
||||||
montereyblocker
|
montereyblocker
|
||||||
|
mowgliiitsycal
|
||||||
musescore
|
musescore
|
||||||
muzzle
|
muzzle
|
||||||
netnewswire
|
netnewswire
|
||||||
@@ -200,6 +220,7 @@ nextcloud
|
|||||||
nomad
|
nomad
|
||||||
nomadlogin
|
nomadlogin
|
||||||
notion
|
notion
|
||||||
|
nudge
|
||||||
nvivo
|
nvivo
|
||||||
obs
|
obs
|
||||||
obsidian
|
obsidian
|
||||||
@@ -217,7 +238,10 @@ onlyofficedesktop
|
|||||||
openvpnconnect
|
openvpnconnect
|
||||||
openvpnconnectv3
|
openvpnconnectv3
|
||||||
opera
|
opera
|
||||||
|
ottomatic
|
||||||
|
overflow
|
||||||
pacifist
|
pacifist
|
||||||
|
pandoc
|
||||||
parsec
|
parsec
|
||||||
pdfsam
|
pdfsam
|
||||||
perimeter81
|
perimeter81
|
||||||
@@ -237,6 +261,8 @@ r
|
|||||||
ramboxce
|
ramboxce
|
||||||
rectangle
|
rectangle
|
||||||
redeye
|
redeye
|
||||||
|
remotix
|
||||||
|
remotixagent
|
||||||
resiliosynchome
|
resiliosynchome
|
||||||
retrobatch
|
retrobatch
|
||||||
ricohpsprinters
|
ricohpsprinters
|
||||||
@@ -254,6 +280,7 @@ scaleft
|
|||||||
screamingfrogseospider
|
screamingfrogseospider
|
||||||
screencloudplayer
|
screencloudplayer
|
||||||
screenflick
|
screenflick
|
||||||
|
sequelpro
|
||||||
sfsymbols
|
sfsymbols
|
||||||
shield
|
shield
|
||||||
sidekick
|
sidekick
|
||||||
@@ -262,6 +289,7 @@ silnite
|
|||||||
sirimote
|
sirimote
|
||||||
sizeup
|
sizeup
|
||||||
sketch
|
sketch
|
||||||
|
sketchupviewer
|
||||||
skype
|
skype
|
||||||
slack
|
slack
|
||||||
smartgit
|
smartgit
|
||||||
@@ -275,7 +303,12 @@ sonoss2
|
|||||||
sourcetree
|
sourcetree
|
||||||
splashtopsos
|
splashtopsos
|
||||||
spotify
|
spotify
|
||||||
|
sqlpropostgres
|
||||||
|
sqlprostudio
|
||||||
|
steelseriesengine
|
||||||
|
strongsync
|
||||||
sublimetext
|
sublimetext
|
||||||
|
superhuman
|
||||||
supportapp
|
supportapp
|
||||||
suspiciouspackage
|
suspiciouspackage
|
||||||
swiftruntimeforcommandlinetools
|
swiftruntimeforcommandlinetools
|
||||||
@@ -283,6 +316,7 @@ sync
|
|||||||
tableaudesktop
|
tableaudesktop
|
||||||
tableaureader
|
tableaureader
|
||||||
tageditor
|
tageditor
|
||||||
|
talkdeskcallbar
|
||||||
taskpaper
|
taskpaper
|
||||||
teamviewer
|
teamviewer
|
||||||
teamviewerhost
|
teamviewerhost
|
||||||
@@ -300,6 +334,7 @@ torbrowser
|
|||||||
trex
|
trex
|
||||||
tunnelbear
|
tunnelbear
|
||||||
tunnelblick
|
tunnelblick
|
||||||
|
typora
|
||||||
umbrellaroamingclient
|
umbrellaroamingclient
|
||||||
uniconverter
|
uniconverter
|
||||||
universaltypeclient
|
universaltypeclient
|
||||||
@@ -314,6 +349,7 @@ vivaldi
|
|||||||
vlc
|
vlc
|
||||||
vmwarehorizonclient
|
vmwarehorizonclient
|
||||||
vscodium
|
vscodium
|
||||||
|
wacomdrivers
|
||||||
wallyezflash
|
wallyezflash
|
||||||
webex
|
webex
|
||||||
webexmeetings
|
webexmeetings
|
||||||
@@ -331,6 +367,7 @@ yubikeymanagerqt
|
|||||||
zappy
|
zappy
|
||||||
zeplin
|
zeplin
|
||||||
zohoworkdrive
|
zohoworkdrive
|
||||||
|
zohoworkdrivetruesync
|
||||||
zoom
|
zoom
|
||||||
zoomclient
|
zoomclient
|
||||||
zoomgov
|
zoomgov
|
||||||
|
|||||||
168
MDM/App script.sh
Executable file
168
MDM/App script.sh
Executable file
@@ -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
|
||||||
176
MDM/App-loop script.sh
Executable file
176
MDM/App-loop script.sh
Executable file
@@ -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
|
||||||
43
MDM/Installomator update.sh
Executable file
43
MDM/Installomator update.sh
Executable file
@@ -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
|
||||||
99
MDM/MDMAddigy CustomSoftware.sh
Executable file
99
MDM/MDMAddigy CustomSoftware.sh
Executable file
@@ -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
|
||||||
72
MDM/MDMMosyle install.sh
Normal file
72
MDM/MDMMosyle install.sh
Normal file
@@ -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
|
||||||
41
MDM/Manual valuesfromarguments.sh
Executable file
41
MDM/Manual valuesfromarguments.sh
Executable file
@@ -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
|
||||||
13
MDM/RemoveInstallomator.sh
Normal file
13
MDM/RemoveInstallomator.sh
Normal file
@@ -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
|
||||||
28
README.md
28
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
|
## 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.
|
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/)
|
- [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 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
|
## Background
|
||||||
|
|
||||||
@@ -112,7 +111,7 @@ There is a debug mode and one other setting that can be controlled with variable
|
|||||||
|
|
||||||
### Extensible
|
### 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)
|
googlechrome)
|
||||||
@@ -121,11 +120,11 @@ googlechrome)
|
|||||||
if [[ $(arch) != "i386" ]]; then
|
if [[ $(arch) != "i386" ]]; then
|
||||||
printlog "Architecture: arm64 (not i386)"
|
printlog "Architecture: arm64 (not i386)"
|
||||||
downloadURL="https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg"
|
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
|
else
|
||||||
printlog "Architecture: i386"
|
printlog "Architecture: i386"
|
||||||
downloadURL="https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
|
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
|
fi
|
||||||
expectedTeamID="EQHXZ8M8AV"
|
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.
|
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
|
### 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:
|
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
|
- `force`: Install even if it’s the same version
|
||||||
|
|
||||||
### Re-opening of closed app
|
### 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`
|
`$updateTool $updateArguments`
|
||||||
Will be run instead of of downloading and installing a complete new version.
|
Will be run instead of of downloading and installing a complete new version.
|
||||||
Use this when the `updateTool` does differential and optimized downloads.
|
Use this when the `updateTool` does differential and optimized downloads.
|
||||||
e.g. `msupdate` (see microsoft installations)
|
e.g. `msupdate` (see various Microsoft installations).
|
||||||
|
|
||||||
- `updateToolRunAsCurrentUser`:
|
- `updateToolRunAsCurrentUser`:
|
||||||
When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and
|
When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and
|
||||||
|
|
||||||
|
- `CLIInstaller`:
|
||||||
|
- `CLIArguments`:
|
||||||
|
If the downloaded dmg is actually an installer that we can call using CLI, we can use these two variables for what to call.
|
||||||
|
We need to define `name` for the installed app (to be version checked), as well as `installerTool` for the installer app (if named differently that `name`. Installomator will add the path to the folder/disk image with the binary, and it will be called like this:
|
||||||
|
`$CLIInstaller $CLIArguments`
|
||||||
|
For most installations `CLIInstaller` should contain the `installerTool` for the CLI call (if 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
|
### Configuration from Arguments
|
||||||
|
|
||||||
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
|
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
|
||||||
|
|||||||
@@ -36,9 +36,20 @@ done
|
|||||||
# lowercase the label
|
# lowercase the label
|
||||||
label=${label:l}
|
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 "################## Start Installomator v. $VERSION"
|
||||||
printlog "################## $label"
|
printlog "################## $label"
|
||||||
|
|
||||||
|
# Check for DEBUG mode
|
||||||
|
if [[ $DEBUG -gt 0 ]]; then
|
||||||
|
printlog "DEBUG mode $DEBUG enabled."
|
||||||
|
fi
|
||||||
|
|
||||||
# How we get version number from app
|
# How we get version number from app
|
||||||
# (alternative is "CFBundleVersion", that can be used in labels)
|
# (alternative is "CFBundleVersion", that can be used in labels)
|
||||||
versionKey="CFBundleShortVersionString"
|
versionKey="CFBundleShortVersionString"
|
||||||
@@ -54,11 +65,6 @@ fi
|
|||||||
|
|
||||||
# MARK: labels in case statement
|
# MARK: labels in case statement
|
||||||
case $label in
|
case $label in
|
||||||
version)
|
|
||||||
# print the script VERSION
|
|
||||||
printlog "$VERSION"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
longversion)
|
longversion)
|
||||||
# print the script version
|
# print the script version
|
||||||
printlog "Installomater: version $VERSION ($VERSIONDATE)"
|
printlog "Installomater: version $VERSION ($VERSIONDATE)"
|
||||||
|
|||||||
7
fragments/broken/mightymike.sh
Normal file
7
fragments/broken/mightymike.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
mightymike)
|
||||||
|
name="Nanosaur"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit jorio MightyMike)
|
||||||
|
appNewVersion=$(versionFromGit jorio MightyMike)
|
||||||
|
expectedTeamID="RVNL7XC27G"
|
||||||
|
;;
|
||||||
7
fragments/broken/nanosaur.sh
Normal file
7
fragments/broken/nanosaur.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
nanosaur)
|
||||||
|
name="Nanosaur"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit jorio Nanosaur)
|
||||||
|
appNewVersion=$(versionFromGit jorio Nanosaur)
|
||||||
|
expectedTeamID="RVNL7XC27G"
|
||||||
|
;;
|
||||||
@@ -148,6 +148,7 @@ getAppVersion() {
|
|||||||
appversion="$(pkgutil --pkg-info-plist ${packageID} 2>/dev/null | grep -A 1 pkg-version | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')"
|
appversion="$(pkgutil --pkg-info-plist ${packageID} 2>/dev/null | grep -A 1 pkg-version | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')"
|
||||||
if [[ $appversion != "" ]]; then
|
if [[ $appversion != "" ]]; then
|
||||||
printlog "found packageID $packageID installed, version $appversion"
|
printlog "found packageID $packageID installed, version $appversion"
|
||||||
|
updateDetected="YES"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
printlog "No version found using packageID $packageID"
|
printlog "No version found using packageID $packageID"
|
||||||
@@ -162,7 +163,11 @@ getAppVersion() {
|
|||||||
else
|
else
|
||||||
applist=$(mdfind "kind:application $appName" -0 )
|
applist=$(mdfind "kind:application $appName" -0 )
|
||||||
fi
|
fi
|
||||||
printlog "App(s) found: ${applist}"
|
if [[ -z applist ]]; then
|
||||||
|
printlog "No previous app found"
|
||||||
|
else
|
||||||
|
printlog "App(s) found: ${applist}"
|
||||||
|
fi
|
||||||
|
|
||||||
appPathArray=( ${(0)applist} )
|
appPathArray=( ${(0)applist} )
|
||||||
|
|
||||||
@@ -173,6 +178,7 @@ getAppVersion() {
|
|||||||
#appversion=$(mdls -name kMDItemVersion -raw $installedAppPath )
|
#appversion=$(mdls -name kMDItemVersion -raw $installedAppPath )
|
||||||
appversion=$(defaults read $installedAppPath/Contents/Info.plist $versionKey) #Not dependant on Spotlight indexing
|
appversion=$(defaults read $installedAppPath/Contents/Info.plist $versionKey) #Not dependant on Spotlight indexing
|
||||||
printlog "found app at $installedAppPath, version $appversion"
|
printlog "found app at $installedAppPath, version $appversion"
|
||||||
|
updateDetected="YES"
|
||||||
# Is current app from App Store
|
# Is current app from App Store
|
||||||
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
|
if [[ -d "$installedAppPath"/Contents/_MASReceipt ]];then
|
||||||
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
|
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
|
||||||
@@ -342,10 +348,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir
|
|||||||
# versioncheck
|
# versioncheck
|
||||||
# credit: Søren Theilgaard (@theilgaard)
|
# credit: Søren Theilgaard (@theilgaard)
|
||||||
appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey)
|
appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey)
|
||||||
if [[ $appversion == $appNewVersion ]]; then
|
if [[ -n $appNewVersion && $appversion == $appNewVersion ]]; then
|
||||||
printlog "Downloaded version of $name is $appNewVersion, same as installed."
|
printlog "Downloaded version of $name is $appNewVersion, same as installed."
|
||||||
if [[ $INSTALL != "force" ]]; then
|
if [[ $INSTALL != "force" ]]; then
|
||||||
message="$name, version $appNewVersion, is the latest version."
|
message="$name, version $appNewVersion, is the latest version."
|
||||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "$message" "No update for $name!"
|
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"
|
printlog "DEBUG mode 2 enabled, exiting"
|
||||||
cleanupAndExit 0
|
cleanupAndExit 0
|
||||||
fi
|
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
|
# copy app to /Applications
|
||||||
if [ -e "$targetDir/$appName" ]; then
|
printlog "Copy $appPath to $targetDir"
|
||||||
printlog "Removing existing $targetDir/$appName"
|
if ! ditto "$appPath" "$targetDir/$appName"; then
|
||||||
rm -Rf "$targetDir/$appName"
|
cleanupAndExit 7 "Error while copying"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy app to /Applications
|
# set ownership to current user
|
||||||
printlog "Copy $appPath to $targetDir"
|
if [ "$currentUser" != "loginwindow" ]; then
|
||||||
if ! ditto "$appPath" "$targetDir/$appName"; then
|
printlog "Changing owner to $currentUser"
|
||||||
cleanupAndExit 7 "Error while copying"
|
chown -R "$currentUser" "$targetDir/$appName"
|
||||||
fi
|
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
|
CLIoutput=$("$mountname/$CLIInstaller" "${CLIArguments[@]}" 2>&1)
|
||||||
if [ "$currentUser" != "loginwindow" ]; then
|
CLIstatus=$(echo $?)
|
||||||
printlog "Changing owner to $currentUser"
|
logoutput="$CLIoutput" # dedupliatelogs "$CLIoutput"
|
||||||
chown -R "$currentUser" "$targetDir/$appName"
|
|
||||||
else
|
if [ $CLIstatus -ne 0 ] ; then
|
||||||
printlog "No user logged in, not changing user"
|
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
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -411,7 +435,6 @@ mountDMG() {
|
|||||||
|
|
||||||
installFromDMG() {
|
installFromDMG() {
|
||||||
mountDMG
|
mountDMG
|
||||||
|
|
||||||
installAppWithPath "$dmgmount/$appName"
|
installAppWithPath "$dmgmount/$appName"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,7 +473,7 @@ installFromPKG() {
|
|||||||
if [[ $appversion == $appNewVersion ]]; then
|
if [[ $appversion == $appNewVersion ]]; then
|
||||||
printlog "Downloaded version of $name is the same as installed."
|
printlog "Downloaded version of $name is the same as installed."
|
||||||
if [[ $INSTALL != "force" ]]; then
|
if [[ $INSTALL != "force" ]]; then
|
||||||
message="$name, version $appNewVersion, is the latest version."
|
message="$name, version $appNewVersion, is the latest version."
|
||||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "$message" "No update for $name!"
|
displaynotification "$message" "No update for $name!"
|
||||||
@@ -598,7 +621,7 @@ runUpdateTool() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finishing() {
|
finishing() {
|
||||||
printlog "Finishing…"
|
printlog "Finishing..."
|
||||||
sleep 10 # wait a moment to let spotlight catch up
|
sleep 10 # wait a moment to let spotlight catch up
|
||||||
getAppVersion
|
getAppVersion
|
||||||
|
|
||||||
@@ -612,7 +635,11 @@ finishing() {
|
|||||||
|
|
||||||
if [[ $currentUser != "loginwindow" && ( $NOTIFY == "success" || $NOTIFY == "all" ) ]]; then
|
if [[ $currentUser != "loginwindow" && ( $NOTIFY == "success" || $NOTIFY == "all" ) ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "$message" "$name update/installation complete!"
|
if [[ $updateDetected == "YES" ]]; then
|
||||||
|
displaynotification "$message" "$name update complete!"
|
||||||
|
else
|
||||||
|
displaynotification "$message" "$name installation complete!"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,8 @@ REOPEN="yes"
|
|||||||
# - archiveName: (optional)
|
# - archiveName: (optional)
|
||||||
# The name of the downloaded file.
|
# The name of the downloaded file.
|
||||||
# When not given the archiveName is derived from the $name.
|
# 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)
|
# - appName: (optional)
|
||||||
# File name of the app bundle in the dmg to verify and copy (include .app).
|
# File name of the app bundle in the dmg to verify and copy (include .app).
|
||||||
@@ -198,8 +200,27 @@ REOPEN="yes"
|
|||||||
# $updateTool $updateArguments
|
# $updateTool $updateArguments
|
||||||
# Will be run instead of of downloading and installing a complete new version.
|
# Will be run instead of of downloading and installing a complete new version.
|
||||||
# Use this when the updateTool does differential and optimized downloads.
|
# Use this when the updateTool does differential and optimized downloads.
|
||||||
# e.g. msupdate
|
# e.g. msupdate on various Microsoft labels
|
||||||
#
|
#
|
||||||
# - updateToolRunAsCurrentUser:
|
# - updateToolRunAsCurrentUser:
|
||||||
# When this variable is set (any value), $updateTool will be run as the current user.
|
# When this variable is set (any value), $updateTool will be run as the current user.
|
||||||
#
|
#
|
||||||
|
# - CLIInstaller:
|
||||||
|
# - CLIArguments:
|
||||||
|
# If the downloaded dmg is actually an installer that we can call using CLI, we can
|
||||||
|
# use these two variables for what to call.
|
||||||
|
# We need to define `name` for the installed app (to be version checked), as well as
|
||||||
|
# `installerTool` for the installer app (if named differently that `name`. Installomator
|
||||||
|
# will add the path to the folder/disk image with the binary, and it will be called like this:
|
||||||
|
`$CLIInstaller $CLIArguments`
|
||||||
|
# For most installations `CLIInstaller` should contain the `installerTool` for the CLI call
|
||||||
|
# (if 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
|
||||||
|
#
|
||||||
|
|||||||
17
fragments/labels/adobecreativeclouddesktop.sh
Normal file
17
fragments/labels/adobecreativeclouddesktop.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
adobecreativeclouddesktop)
|
||||||
|
name="Adobe Creative Cloud"
|
||||||
|
#appName="Install.app"
|
||||||
|
type="dmg"
|
||||||
|
if [[ $(arch) == "arm64" ]]; then
|
||||||
|
downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*macarm64.*dmg" | cut -d '"' -f1 | head -1)
|
||||||
|
elif [[ $(arch) == "i386" ]]; then
|
||||||
|
downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*osx10.*dmg" | cut -d '"' -f1 | head -1)
|
||||||
|
fi
|
||||||
|
#downloadURL=$(curl -fs "https://helpx.adobe.com/download-install/kb/creative-cloud-desktop-app-download.html" | grep -o "https*.*dmg" | head -1)
|
||||||
|
appNewVersion=$(curl -fs "https://helpx.adobe.com/creative-cloud/release-note/cc-release-notes.html" | grep "mandatory" | head -1 | grep -o "Version *.* released" | cut -d " " -f2)
|
||||||
|
installerTool="Install.app"
|
||||||
|
CLIInstaller="Install.app/Contents/MacOS/Install"
|
||||||
|
CLIArguments=(--mode=silent)
|
||||||
|
expectedTeamID="JQ525L2MZD"
|
||||||
|
Company="Adobe"
|
||||||
|
;;
|
||||||
@@ -3,6 +3,6 @@ airserver)
|
|||||||
name="AirServer"
|
name="AirServer"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL="https://www.airserver.com/download/mac/latest"
|
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"
|
expectedTeamID="6C755KS5W3"
|
||||||
;;
|
;;
|
||||||
|
|||||||
7
fragments/labels/alephone.sh
Normal file
7
fragments/labels/alephone.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
alephone)
|
||||||
|
name="Aleph One"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit Aleph-One-Marathon alephone)
|
||||||
|
appNewVersion=$(versionFromGit Aleph-One-Marathon alephone)
|
||||||
|
expectedTeamID="E8K89CXZE7"
|
||||||
|
;;
|
||||||
@@ -2,5 +2,6 @@ apparency)
|
|||||||
name="Apparency"
|
name="Apparency"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL="https://www.mothersruin.com/software/downloads/Apparency.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"
|
expectedTeamID="936EB786NH"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ applesfsymbols|\
|
|||||||
sfsymbols)
|
sfsymbols)
|
||||||
name="SF Symbols"
|
name="SF Symbols"
|
||||||
type="pkgInDmg"
|
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"
|
expectedTeamID="Software Update"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
audacity)
|
audacity)
|
||||||
# credit: Gabe Marchan (gabemarchan.com - @darklink87)
|
|
||||||
name="Audacity"
|
name="Audacity"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL=$(downloadURLFromGit audacity audacity)
|
downloadURL=$(downloadURLFromGit audacity audacity)
|
||||||
appNewVersion=$(versionFromGit audacity audacity)
|
appNewVersion=$(versionFromGit audacity audacity)
|
||||||
expectedTeamID="T3N4JQ7YY6"
|
expectedTeamID="AWEYX923UX"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ bluejeans)
|
|||||||
name="BlueJeans"
|
name="BlueJeans"
|
||||||
type="pkg"
|
type="pkg"
|
||||||
if [[ $(arch) == "arm64" ]]; then
|
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
|
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')
|
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
|
fi
|
||||||
|
|||||||
7
fragments/labels/bugdom.sh
Normal file
7
fragments/labels/bugdom.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
bugdom)
|
||||||
|
name="Bugdom"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit jorio Bugdom)
|
||||||
|
appNewVersion=$(versionFromGit jorio Bugdom)
|
||||||
|
expectedTeamID="RVNL7XC27G"
|
||||||
|
;;
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
camostudio)
|
camostudio)
|
||||||
# credit: Søren Theilgaard (@theilgaard)
|
|
||||||
name="Camo Studio"
|
name="Camo Studio"
|
||||||
type="zip"
|
type="zip"
|
||||||
downloadURL="https://reincubate.com/res/labs/camo/camo-macos-latest.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"
|
expectedTeamID="Q248YREB53"
|
||||||
;;
|
;;
|
||||||
|
|||||||
11
fragments/labels/canva.sh
Normal file
11
fragments/labels/canva.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
6
fragments/labels/chatwork.sh
Normal file
6
fragments/labels/chatwork.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
chatwork)
|
||||||
|
name="Chatwork"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL="https://desktop-app.chatwork.com/installer/Chatwork.dmg"
|
||||||
|
expectedTeamID="H34A3H2Y54"
|
||||||
|
;;
|
||||||
7
fragments/labels/closeio.sh
Normal file
7
fragments/labels/closeio.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
closeio)
|
||||||
|
name="Close.io"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit closeio closeio-desktop-releases)
|
||||||
|
appNewVersion=$(versionFromGit closeio closeio-desktop-releases)
|
||||||
|
expectedTeamID="WTNQ6773UC"
|
||||||
|
;;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
dialog)
|
dialog)
|
||||||
name="Dialog"
|
name="Dialog"
|
||||||
type="pkg"
|
type="pkg"
|
||||||
downloadURL=$(downloadURLFromGit bartreardon Dialog-public )
|
packageID="au.csiro.dialogcli"
|
||||||
appNewVersion=$(versionFromGit bartreardon Dialog-public )
|
downloadURL="$(downloadURLFromGit bartreardon Dialog)"
|
||||||
|
appNewVersion="$(versionFromGit bartreardon Dialog)"
|
||||||
expectedTeamID="PWA5E9TQ59"
|
expectedTeamID="PWA5E9TQ59"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
9
fragments/labels/eshareosx.sh
Normal file
9
fragments/labels/eshareosx.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
7
fragments/labels/exifrenamer.sh
Normal file
7
fragments/labels/exifrenamer.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
7
fragments/labels/fastscripts.sh
Normal file
7
fragments/labels/fastscripts.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fastscripts)
|
||||||
|
name="FastScripts"
|
||||||
|
type="zip"
|
||||||
|
downloadURL=$( curl -fs "https://redsweater.com/fastscripts/appcast3.php" | xpath '(//rss/channel/item/enclosure/@url)[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"
|
||||||
|
;;
|
||||||
7
fragments/labels/findanyfile.sh
Normal file
7
fragments/labels/findanyfile.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
findanyfile)
|
||||||
|
name="Find Any File"
|
||||||
|
type="zip"
|
||||||
|
downloadURL=$(curl -fs "https://findanyfile.app/appcast2.php" | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | cut -d '"' -f2)
|
||||||
|
appNewVersion=$(curl -fs "https://findanyfile.app/appcast2.php" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2)
|
||||||
|
expectedTeamID="25856V4B4X"
|
||||||
|
;;
|
||||||
@@ -2,7 +2,7 @@ firefox)
|
|||||||
name="Firefox"
|
name="Firefox"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
|
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 '<html' | /usr/bin/awk -F\" '{ print $8 }') # Credit: William Smith (@meck)
|
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
|
||||||
expectedTeamID="43AQ936H96"
|
expectedTeamID="43AQ936H96"
|
||||||
blockingProcesses=( firefox )
|
blockingProcesses=( firefox )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ firefox_da)
|
|||||||
name="Firefox"
|
name="Firefox"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=da"
|
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=da"
|
||||||
appNewVersion=$(/usr/bin/curl https://www.mozilla.org/en-US/firefox/releases/ --silent | /usr/bin/grep '<html' | /usr/bin/awk -F\" '{ print $8 }') # Credit: William Smith (@meck)
|
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
|
||||||
expectedTeamID="43AQ936H96"
|
expectedTeamID="43AQ936H96"
|
||||||
blockingProcesses=( firefox )
|
blockingProcesses=( firefox )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ firefox_intl)
|
|||||||
printlog "Download not found for that language. Using en-US"
|
printlog "Download not found for that language. Using en-US"
|
||||||
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
|
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
|
||||||
fi
|
fi
|
||||||
appNewVersion=$(/usr/bin/curl -sl https://www.mozilla.org/en-US/firefox/releases/ | /usr/bin/grep '<html' | /usr/bin/awk -F\" '{ print $8 }') # Credit: William Smith (@meck)
|
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
|
||||||
expectedTeamID="43AQ936H96"
|
expectedTeamID="43AQ936H96"
|
||||||
blockingProcesses=( firefox )
|
blockingProcesses=( firefox )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,7 +2,8 @@ inkscape)
|
|||||||
# credit: Søren Theilgaard (@theilgaard)
|
# credit: Søren Theilgaard (@theilgaard)
|
||||||
name="Inkscape"
|
name="Inkscape"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
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/1010-1015/dl/ | grep "click here" | cut -d '"' -f 2)"
|
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)"
|
||||||
#appNewVersion=$(curl -fsJL https://inkscape.org/release/ | grep "<h2>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)"
|
appCustomVersion() { /Applications/Inkscape.app/Contents/MacOS/inkscape --version | cut -d " " -f2 }
|
||||||
|
appNewVersion=$(curl -fsJL https://inkscape.org/release/ | grep "<title>" | grep -o -e "[0-9.]*")
|
||||||
expectedTeamID="SW3D6BB6A6"
|
expectedTeamID="SW3D6BB6A6"
|
||||||
;;
|
;;
|
||||||
|
|||||||
10
fragments/labels/installomator.sh
Normal file
10
fragments/labels/installomator.sh
Normal file
@@ -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 )
|
||||||
|
;;
|
||||||
@@ -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 )
|
|
||||||
;;
|
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
jabradirect)
|
jabradirect)
|
||||||
name="Jabra Direct"
|
name="Jabra Direct"
|
||||||
type="pkgInDmg"
|
type="pkgInDmg"
|
||||||
|
packageID="com.jabra.directonline"
|
||||||
downloadURL="https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/JabraDirectSetup.dmg"
|
downloadURL="https://jabraxpressonlineprdstor.blob.core.windows.net/jdo/JabraDirectSetup.dmg"
|
||||||
|
appNewVersion=$(curl -fs https://www.jabra.com/Support/release-notes/release-note-jabra-direct | grep -oe "Release version:.*[0-9.]*<" | head -1 | cut -d ">" -f2 | cut -d "<" -f1 | sed 's/ //g')
|
||||||
expectedTeamID="55LV32M29R"
|
expectedTeamID="55LV32M29R"
|
||||||
appNewVersion=$(curl -fs https://www.jabra.com/Support/release-notes/release-note-jabra-direct | grep -o "Jabra Direct macOS:*.*<" | head -1 | cut -d ":" -f2 | cut -d " " -f2 | cut -d "<" -f1)
|
|
||||||
;;
|
;;
|
||||||
|
|||||||
13
fragments/labels/jetbrainsrubymine.sh
Normal file
13
fragments/labels/jetbrainsrubymine.sh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
jetbrainsrubymine)
|
||||||
|
name="RubyMine"
|
||||||
|
type="dmg"
|
||||||
|
jetbrainscode="RM"
|
||||||
|
if [[ $(arch) == i386 ]]; then
|
||||||
|
jetbrainsdistribution="mac"
|
||||||
|
elif [[ $(arch) == arm64 ]]; then
|
||||||
|
jetbrainsdistribution="macM1"
|
||||||
|
fi
|
||||||
|
downloadURL="https://download.jetbrains.com/product?code=${jetbrainscode}&latest&distribution=${jetbrainsdistribution}"
|
||||||
|
appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "location" | tail -1 | sed -E 's/.*\/[a-zA-Z-]*-([0-9.]*).*[-.].*dmg/\1/g' )
|
||||||
|
expectedTeamID="2ZEFAR8TH3"
|
||||||
|
;;
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
lexarrecoverytool)
|
lexarrecoverytool)
|
||||||
# credit: Søren Theilgaard (@theilgaard)
|
|
||||||
name="Lexar Recovery Tool"
|
name="Lexar Recovery Tool"
|
||||||
type="appInDmgInZip"
|
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" )"
|
downloadURL="https://www.lexar.com/wp-content/uploads/product_images/Lexar-Recovery-Tool-Mac.zip"
|
||||||
#appNewVersion=""
|
|
||||||
expectedTeamID="Y8HM6WR2DV"
|
expectedTeamID="Y8HM6WR2DV"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ logitechoptions)
|
|||||||
name="Logitech Options"
|
name="Logitech Options"
|
||||||
type="pkgInZip"
|
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}')
|
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"
|
pkgName="LogiMgr Installer ${appNewVersion}.app/Contents/Resources/LogiMgr.pkg"
|
||||||
expectedTeamID="QED4VVPZWA"
|
expectedTeamID="QED4VVPZWA"
|
||||||
;;
|
;;
|
||||||
|
|||||||
13
fragments/labels/logseq.sh
Normal file
13
fragments/labels/logseq.sh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
logseq)
|
||||||
|
name="Logseq"
|
||||||
|
type="dmg"
|
||||||
|
if [[ $(arch) == "arm64" ]]; then
|
||||||
|
archiveName="darwin-arm64-[0-9.]*.dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit logseq logseq)
|
||||||
|
elif [[ $(arch) == "i386" ]]; then
|
||||||
|
archiveName="darwin-x64-[0-9.]*.dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit logseq logseq)
|
||||||
|
fi
|
||||||
|
appNewVersion=$(versionFromGit logseq logseq)
|
||||||
|
expectedTeamID="3K44EUN829"
|
||||||
|
;;
|
||||||
7
fragments/labels/maccyapp.sh
Normal file
7
fragments/labels/maccyapp.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
maccyapp)
|
||||||
|
name="Maccy"
|
||||||
|
type="zip"
|
||||||
|
downloadURL="$(downloadURLFromGit p0deje Maccy)"
|
||||||
|
appNewVersion="$(versionFromGit p0deje Maccy)"
|
||||||
|
expectedTeamID="MN3X4648SC"
|
||||||
|
;;
|
||||||
23
fragments/labels/macports.sh
Normal file
23
fragments/labels/macports.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
8
fragments/labels/marathon.sh
Normal file
8
fragments/labels/marathon.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
marathon)
|
||||||
|
name="Marathon"
|
||||||
|
type="dmg"
|
||||||
|
archiveName="Marathon-[0-9.]*-Mac.dmg"
|
||||||
|
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
|
||||||
|
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
|
||||||
|
expectedTeamID="E8K89CXZE7"
|
||||||
|
;;
|
||||||
8
fragments/labels/marathon2.sh
Normal file
8
fragments/labels/marathon2.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
marathon2)
|
||||||
|
name="Marathon 2"
|
||||||
|
type="dmg"
|
||||||
|
archiveName="Marathon2-[0-9.]*-Mac.dmg"
|
||||||
|
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
|
||||||
|
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
|
||||||
|
expectedTeamID="E8K89CXZE7"
|
||||||
|
;;
|
||||||
8
fragments/labels/marathoninfinity.sh
Normal file
8
fragments/labels/marathoninfinity.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
marathoninfinity)
|
||||||
|
name="Marathon Infinity"
|
||||||
|
type="dmg"
|
||||||
|
archiveName="MarathonInfinity-[0-9.]*-Mac.dmg"
|
||||||
|
downloadURL="$(downloadURLFromGit Aleph-One-Marathon alephone)"
|
||||||
|
appNewVersion="$(versionFromGit Aleph-One-Marathon alephone)"
|
||||||
|
expectedTeamID="E8K89CXZE7"
|
||||||
|
;;
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
mattermost)
|
mattermost)
|
||||||
name="Mattermost"
|
name="Mattermost"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
if [[ $(arch) == i386 ]]; then
|
archiveName="mac-universal.dmg"
|
||||||
archiveName="mac.dmg"
|
|
||||||
elif [[ $(arch) == arm64 ]]; then
|
|
||||||
archiveName="mac-m1.dmg"
|
|
||||||
fi
|
|
||||||
downloadURL=$(downloadURLFromGit mattermost desktop)
|
downloadURL=$(downloadURLFromGit mattermost desktop)
|
||||||
appNewVersion=$(versionFromGit mattermost desktop )
|
appNewVersion=$(versionFromGit mattermost desktop )
|
||||||
expectedTeamID="UQ8HT4Q2XM"
|
expectedTeamID="UQ8HT4Q2XM"
|
||||||
|
Mattermost Helper (Renderer).app app.asar
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftcompanyportal)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.intunecompanyportal.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.intunecompanyportal.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/CompanyPortal_.*pkg" | cut -d "_" -f 2 | cut -d "-" -f 1)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps IMCP01 )
|
updateToolArguments=( --install --apps IMCP01 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftdefenderatp)
|
|||||||
appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.defender.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.defender.standalone"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
||||||
# No version number in download url
|
# No version number in download url
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps WDAV00 )
|
updateToolArguments=( --install --apps WDAV00 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
microsoftedge|\
|
microsoftedge|\
|
||||||
microsoftedgeconsumerstable)
|
microsoftedgeconsumerstable|\
|
||||||
|
microsoftedgeenterprisestable)
|
||||||
name="Microsoft Edge"
|
name="Microsoft Edge"
|
||||||
type="pkg"
|
type="pkg"
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=2069148"
|
downloadURL="https://go.microsoft.com/fwlink/?linkid=2093504"
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/cfbundleversion' 2>/dev/null | sed -E 's/<cfbundleversion>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/cfbundleversion' 2>/dev/null | sed -E 's/<cfbundleversion>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps EDGE01 )
|
updateToolArguments=( --install --apps EDGE01 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
microsoftedgeenterprisestable)
|
|
||||||
name="Microsoft Edge"
|
|
||||||
type="pkg"
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?linkid=2093438"
|
|
||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.edge"]/version' 2>/dev/null | sed -E 's/<version>([0-9.]*) .*/\1/')
|
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/MicrosoftEdge.*pkg" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
|
||||||
expectedTeamID="UBF8T346G9"
|
|
||||||
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
|
||||||
updateToolArguments=( --install --apps EDGE01 )
|
|
||||||
;;
|
|
||||||
@@ -5,6 +5,10 @@ microsoftexcel)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.excel.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.excel.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps XCEL2019 )
|
updateToolArguments=( --install --apps XCEL2019 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ microsoftoffice365)
|
|||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
# using MS PowerPoint as the 'stand-in' for the entire suite
|
# using MS PowerPoint as the 'stand-in' for the entire suite
|
||||||
#appName="Microsoft PowerPoint.app"
|
#appName="Microsoft PowerPoint.app"
|
||||||
|
if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $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" )
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install )
|
updateToolArguments=( --install )
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ microsoftofficebusinesspro)
|
|||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
# using MS PowerPoint as the 'stand-in' for the entire suite
|
# using MS PowerPoint as the 'stand-in' for the entire suite
|
||||||
appName="Microsoft PowerPoint.app"
|
appName="Microsoft PowerPoint.app"
|
||||||
|
if [[ -x "/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate" && $INSTALL != "force" && $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")
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install )
|
updateToolArguments=( --install )
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftonedrive)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onedrive.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onedrive.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | cut -d "/" -f 6 | cut -d "." -f 1-3)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps ONDR18 )
|
updateToolArguments=( --install --apps ONDR18 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftonenote)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onenote.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.onenote.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps ONMC2019 )
|
updateToolArguments=( --install --apps ONMC2019 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftoutlook)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.outlook.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.outlook.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps OPIM2019 )
|
updateToolArguments=( --install --apps OPIM2019 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftpowerpoint)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.powerpoint.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.powerpoint.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps PPT32019 )
|
updateToolArguments=( --install --apps PPT32019 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftremotedesktop)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.remotedesktop.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.remotedesktop.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_Remote_Desktop.*pkg" | cut -d "_" -f 4)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps MSRD10 )
|
updateToolArguments=( --install --apps MSRD10 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftskypeforbusiness)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.skypeforbusiness.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.skypeforbusiness.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps MSFB16 )
|
updateToolArguments=( --install --apps MSFB16 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -8,6 +8,6 @@ microsoftteams)
|
|||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
blockingProcesses=( Teams "Microsoft Teams Helper" )
|
blockingProcesses=( Teams "Microsoft Teams Helper" )
|
||||||
# Commenting out msupdate as it is not really supported *yet* for teams
|
# 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 )
|
# updateToolArguments=( --install --apps TEAM01 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ microsoftvisualstudiocode|\
|
|||||||
visualstudiocode)
|
visualstudiocode)
|
||||||
name="Visual Studio Code"
|
name="Visual Studio Code"
|
||||||
type="zip"
|
type="zip"
|
||||||
#downloadURL="https://go.microsoft.com/fwlink/?LinkID=620882" # Intel only
|
|
||||||
downloadURL="https://go.microsoft.com/fwlink/?LinkID=2156837" # Universal
|
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 )
|
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"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ microsoftword)
|
|||||||
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.word.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/package[id="com.microsoft.word.standalone.365"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3 | cut -d "." -f 1-2)
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
|
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"
|
updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
||||||
updateToolArguments=( --install --apps MSWD2019 )
|
updateToolArguments=( --install --apps MSWD2019 )
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -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/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
#appNewVersion=$(curl -fs https://macadmins.software/latest.xml | xpath '//latest/oldpackage[id="com.microsoft.yammer.standalone"]/cfbundleshortversionstring' 2>/dev/null | sed -E 's/<cfbundleshortversionstring>([0-9.]*)<.*/\1/')
|
||||||
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
expectedTeamID="UBF8T346G9"
|
expectedTeamID="UBF8T346G9"
|
||||||
#updateTool="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/msupdate"
|
#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 ?????? )
|
#updateToolArguments=( --install --apps ?????? )
|
||||||
;;
|
;;
|
||||||
|
|||||||
8
fragments/labels/mowgliiitsycal.sh
Normal file
8
fragments/labels/mowgliiitsycal.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
mowgliiitsycal)
|
||||||
|
name="Itsycal"
|
||||||
|
type="zip"
|
||||||
|
downloadURL=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
|
||||||
|
appNewVersion=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal.xml | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2)
|
||||||
|
expectedTeamID="HFT3T55WND"
|
||||||
|
;;
|
||||||
|
|
||||||
8
fragments/labels/nudge.sh
Normal file
8
fragments/labels/nudge.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
nudge)
|
||||||
|
name="Nudge"
|
||||||
|
type="pkg"
|
||||||
|
downloadURL=$(downloadURLFromGit macadmins Nudge )
|
||||||
|
appNewVersion=$(versionFromGit macadmins Nudge )
|
||||||
|
expectedTeamID="9GQZ7KUFR6"
|
||||||
|
archiveName="Nudge-[0-9.]*.pkg"
|
||||||
|
;;
|
||||||
8
fragments/labels/ottomatic.sh
Normal file
8
fragments/labels/ottomatic.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
ottomatic)
|
||||||
|
name="Otto Matic"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=$(downloadURLFromGit jorio OttoMatic)
|
||||||
|
appNewVersion=$(versionFromGit jorio OttoMatic)
|
||||||
|
expectedTeamID="RVNL7XC27G"
|
||||||
|
;;
|
||||||
|
|
||||||
8
fragments/labels/overflow.sh
Normal file
8
fragments/labels/overflow.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
overflow)
|
||||||
|
name="Overflow"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL="$(curl -sL 'https://overflow.io/download/' | awk -F '"' '/app-updates.overflow.io\/packages\/updates\/osx_64/ { print $8; exit }')"
|
||||||
|
appNewVersion=$(echo "$downloadURL" | awk -F '-|[.]dmg' '{ print $(NF-1) }')
|
||||||
|
expectedTeamID="7TK7YSGJFF"
|
||||||
|
versionKey="CFBundleShortVersionString"
|
||||||
|
;;
|
||||||
9
fragments/labels/pandoc.sh
Normal file
9
fragments/labels/pandoc.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
7
fragments/labels/protonvpn.sh
Normal file
7
fragments/labels/protonvpn.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
r)
|
r)
|
||||||
# credit: Tadayuki Onishi (@kenchan0130)
|
|
||||||
name="R"
|
name="R"
|
||||||
type="pkg"
|
type="pkg"
|
||||||
downloadURL=$( curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p' )
|
downloadURL="https://cloud.r-project.org/bin/macosx/$( curl -fsL https://cloud.r-project.org/bin/macosx/ | grep -m 1 -o '<a href=".*pkg">' | sed -E 's/.+"(.+)".+/\1/g' )"
|
||||||
appNewVersion=$(curl -fsL https://formulae.brew.sh/api/cask/r.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p')
|
appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')
|
||||||
expectedTeamID="VZLD955F6P"
|
expectedTeamID="VZLD955F6P"
|
||||||
;;
|
;;
|
||||||
|
|||||||
7
fragments/labels/remotix.sh
Normal file
7
fragments/labels/remotix.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
8
fragments/labels/remotixagent.sh
Normal file
8
fragments/labels/remotixagent.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
screencloudplayer)
|
screencloudplayer)
|
||||||
# credit: AP Orlebeke (@apizz)
|
|
||||||
name="ScreenCloud Player"
|
name="ScreenCloud Player"
|
||||||
type="dmg"
|
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"
|
expectedTeamID="3C4F953K6P"
|
||||||
;;
|
;;
|
||||||
|
|||||||
7
fragments/labels/sequelpro.sh
Normal file
7
fragments/labels/sequelpro.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
sequelpro)
|
||||||
|
name="Sequel Pro"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL="$(downloadURLFromGit sequelpro sequelpro)"
|
||||||
|
appNewVersion="$(versionFromGit sequelpro sequelpro)"
|
||||||
|
expectedTeamID="Media"
|
||||||
|
;;
|
||||||
6
fragments/labels/sketchupviewer.sh
Normal file
6
fragments/labels/sketchupviewer.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
sketchupviewer)
|
||||||
|
name="SketchUpViewer"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL="$(curl -fs https://www.sketchup.com/sketchup/SketchUpViewer-en-dmg | grep "<a href=" | sed 's/.*href="//' | sed 's/".*//')"
|
||||||
|
expectedTeamID="J8PVMCY7KL"
|
||||||
|
;;
|
||||||
@@ -1,7 +1,11 @@
|
|||||||
smartgit)
|
smartgit)
|
||||||
name="SmartGit"
|
name="SmartGit"
|
||||||
type="dmg"
|
type="dmg"
|
||||||
downloadURL="https://www.syntevo.com$(curl -fs "https://www.syntevo.com/smartgit/download/" | grep -i -o -E "/downloads/.*/smartgit.*\.dmg")"
|
if [[ $(arch) == "arm64" ]]; then
|
||||||
|
downloadURL="https://www.syntevo.com$(curl -fs "https://www.syntevo.com/smartgit/download/" | grep -i -o -E "/downloads/.*/smartgit.*\.dmg" | tail -1)"
|
||||||
|
elif [[ $(arch) == "i386" ]]; then
|
||||||
|
downloadURL="https://www.syntevo.com$(curl -fs "https://www.syntevo.com/smartgit/download/" | grep -i -o -E "/downloads/.*/smartgit.*\.dmg" | head -1)"
|
||||||
|
fi
|
||||||
appNewVersion="$(curl -fs "https://www.syntevo.com/smartgit/changelog.txt" | grep -i -E "SmartGit *[0-9.]* *.*" | head -1 | awk '{print $2}')"
|
appNewVersion="$(curl -fs "https://www.syntevo.com/smartgit/changelog.txt" | grep -i -E "SmartGit *[0-9.]* *.*" | head -1 | awk '{print $2}')"
|
||||||
expectedTeamID="PHMY45PTNW"
|
expectedTeamID="PHMY45PTNW"
|
||||||
;;
|
;;
|
||||||
|
|||||||
7
fragments/labels/sqlpropostgres.sh
Normal file
7
fragments/labels/sqlpropostgres.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
sqlpropostgres)
|
||||||
|
name="SQLPro for Postgres"
|
||||||
|
type="zip"
|
||||||
|
downloadURL="https://macpostgresclient.com/download.php"
|
||||||
|
expectedTeamID="LKJB72232C"
|
||||||
|
blockingProcesses=( "SQLPro for Postgres" )
|
||||||
|
;;
|
||||||
7
fragments/labels/sqlprostudio.sh
Normal file
7
fragments/labels/sqlprostudio.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
sqlprostudio)
|
||||||
|
name="SQLPro Studio"
|
||||||
|
type="zip"
|
||||||
|
downloadURL="https://www.sqlprostudio.com/download.php"
|
||||||
|
expectedTeamID="LKJB72232C"
|
||||||
|
blockingProcesses=( "SQLPro Studio" )
|
||||||
|
;;
|
||||||
7
fragments/labels/steelseriesengine.sh
Normal file
7
fragments/labels/steelseriesengine.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
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"
|
||||||
|
;;
|
||||||
9
fragments/labels/strongsync.sh
Normal file
9
fragments/labels/strongsync.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
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"
|
||||||
|
;;
|
||||||
11
fragments/labels/superhuman.sh
Normal file
11
fragments/labels/superhuman.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
superhuman)
|
||||||
|
name="superhuman"
|
||||||
|
type="dmg"
|
||||||
|
if [[ $(arch) == "arm64" ]]; then
|
||||||
|
downloadURL="https://download.superhuman.com/Superhuman-arm64.dmg"
|
||||||
|
elif [[ $(arch) == "i386" ]]; then
|
||||||
|
downloadURL="https://download.superhuman.com/Superhuman.dmg"
|
||||||
|
fi
|
||||||
|
appNewVersion=$(curl -fs "https://storage.googleapis.com/download.superhuman.com/supertron-update/latest-mac.yml" | head -1 | cut -d " " -f2)
|
||||||
|
expectedTeamID="6XHFYUTQGX"
|
||||||
|
;;
|
||||||
7
fragments/labels/talkdeskcallbar.sh
Normal file
7
fragments/labels/talkdeskcallbar.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
talkdeskcallbar)
|
||||||
|
name="Callbar"
|
||||||
|
type="dmg"
|
||||||
|
downloadURL=https://downloadcallbar.talkdesk.com/Callbar-$(curl -fsL https://downloadcallbar.talkdesk.com/release_metadata.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p').dmg
|
||||||
|
appNewVersion=$(curl -fsL https://downloadcallbar.talkdesk.com/release_metadata.json | sed -n 's/^.*"version":"\([^"]*\)".*$/\1/p')
|
||||||
|
expectedTeamID="YGGJX44TB8"
|
||||||
|
;;
|
||||||
9
fragments/labels/typora.sh
Normal file
9
fragments/labels/typora.sh
Normal file
@@ -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.]*</h4" | head -1 | sed -E 's/.*h4>([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"
|
||||||
|
;;
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
vagrant)
|
vagrant)
|
||||||
# credit: AP Orlebeke (@apizz)
|
|
||||||
name="Vagrant"
|
name="Vagrant"
|
||||||
type="pkgInDmg"
|
type="pkgInDmg"
|
||||||
pkgName="vagrant.pkg"
|
pkgName="vagrant.pkg"
|
||||||
downloadURL=$(curl -fs https://www.vagrantup.com/downloads | tr '><' '\n' | awk -F'"' '/x86_64.dmg/ {print $6}' | head -1)
|
downloadURL=$(curl -fs "https://www.vagrantup.com/downloads" | tr '"' '\n' | grep "^https.*\.dmg$" | head -1)
|
||||||
#appNewVersion=$( curl -fs https://www.vagrantup.com/downloads.html | grep -i "Current Version" )
|
appNewVersion=$( echo $downloadURL | cut -d "/" -f5 )
|
||||||
appNewVersion=$(versionFromGit hashicorp vagrant)
|
|
||||||
expectedTeamID="D38WU7D763"
|
expectedTeamID="D38WU7D763"
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
vscodium)
|
vscodium)
|
||||||
# credit: AP Orlebeke (@apizz)
|
|
||||||
name="VSCodium"
|
name="VSCodium"
|
||||||
type="dmg"
|
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)"
|
||||||
#downloadURL=$(downloadURLFromGit VSCodium vscodium) # Too many versions
|
appNewVersion="$(versionFromGit VSCodium vscodium)"
|
||||||
appNewVersion=$(versionFromGit VSCodium vscodium)
|
|
||||||
expectedTeamID="C7S3ZQ2B8V"
|
expectedTeamID="C7S3ZQ2B8V"
|
||||||
appName="VSCodium.app"
|
|
||||||
blockingProcesses=( Electron )
|
blockingProcesses=( Electron )
|
||||||
;;
|
;;
|
||||||
|
|||||||
8
fragments/labels/wacomdrivers.sh
Normal file
8
fragments/labels/wacomdrivers.sh
Normal file
@@ -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 ' ')"
|
||||||
|
;;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
xink)
|
xink)
|
||||||
name="Xink"
|
name="Xink"
|
||||||
type="zip"
|
type="pkg"
|
||||||
downloadURL="https://downloads.xink.io/macos/client"
|
packageID="com.emailsignature.Xink"
|
||||||
#appNewVersion=$() # Cannot find version history or release notes on home page
|
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"
|
expectedTeamID="F287823HVS"
|
||||||
;;
|
;;
|
||||||
|
|||||||
11
fragments/labels/zohoworkdrivetruesync.sh
Normal file
11
fragments/labels/zohoworkdrivetruesync.sh
Normal file
@@ -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"
|
||||||
|
;;
|
||||||
@@ -117,6 +117,10 @@ printlog "appversion: $appversion"
|
|||||||
|
|
||||||
# MARK: Exit if new version is the same as installed version (appNewVersion specified)
|
# MARK: Exit if new version is the same as installed version (appNewVersion specified)
|
||||||
# credit: Søren Theilgaard (@theilgaard)
|
# credit: Søren Theilgaard (@theilgaard)
|
||||||
|
if [[ $INSTALL == "force" ]]; then
|
||||||
|
printlog "Using force to install, so not using updateTool."
|
||||||
|
updateTool=""
|
||||||
|
fi
|
||||||
if [[ -n $appNewVersion ]]; then
|
if [[ -n $appNewVersion ]]; then
|
||||||
printlog "Latest version of $name is $appNewVersion"
|
printlog "Latest version of $name is $appNewVersion"
|
||||||
if [[ $appversion == $appNewVersion ]]; then
|
if [[ $appversion == $appNewVersion ]]; then
|
||||||
@@ -129,9 +133,6 @@ if [[ -n $appNewVersion ]]; then
|
|||||||
displaynotification "$message" "No update for $name!"
|
displaynotification "$message" "No update for $name!"
|
||||||
fi
|
fi
|
||||||
cleanupAndExit 0 "No newer version."
|
cleanupAndExit 0 "No newer version."
|
||||||
else
|
|
||||||
printlog "Using force to install anyway. Not using updateTool."
|
|
||||||
updateTool=""
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printlog "DEBUG mode 1 enabled, not exiting, but there is no new version of app."
|
printlog "DEBUG mode 1 enabled, not exiting, but there is no new version of app."
|
||||||
@@ -139,10 +140,6 @@ if [[ -n $appNewVersion ]]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
printlog "Latest version not specified."
|
printlog "Latest version not specified."
|
||||||
if [[ $INSTALL == "force" ]]; then
|
|
||||||
printlog "Using force to install, so not using updateTool."
|
|
||||||
updateTool=""
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MARK: check if this is an Update and we can use updateTool
|
# MARK: check if this is an Update and we can use updateTool
|
||||||
@@ -169,14 +166,22 @@ else
|
|||||||
printlog "Downloading $downloadURL to $archiveName"
|
printlog "Downloading $downloadURL to $archiveName"
|
||||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "Downloading $name update" "Download in progress …"
|
if [[ $updateDetected == "YES" ]]; then
|
||||||
|
displaynotification "Downloading $name update" "Download in progress …"
|
||||||
|
else
|
||||||
|
displaynotification "Downloading new $name" "Download in progress …"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if ! curl --location --fail --silent "$downloadURL" -o "$archiveName"; then
|
if ! curl --location --fail --silent "$downloadURL" -o "$archiveName"; then
|
||||||
printlog "error downloading $downloadURL"
|
printlog "error downloading $downloadURL"
|
||||||
message="$name update/installation failed. This will be logged, so IT can follow up."
|
message="$name update/installation failed. This will be logged, so IT can follow up."
|
||||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "$message" "Error installing/updating $name"
|
if [[ $updateDetected == "YES" ]]; then
|
||||||
|
displaynotification "$message" "Error updating $name"
|
||||||
|
else
|
||||||
|
displaynotification "$message" "Error installing $name"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
cleanupAndExit 2
|
cleanupAndExit 2
|
||||||
fi
|
fi
|
||||||
@@ -199,7 +204,17 @@ fi
|
|||||||
printlog "Installing $name"
|
printlog "Installing $name"
|
||||||
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then
|
||||||
printlog "notifying"
|
printlog "notifying"
|
||||||
displaynotification "Installing $name" "Installation in progress …"
|
if [[ $updateDetected == "YES" ]]; then
|
||||||
|
displaynotification "Updating $name" "Installation in progress …"
|
||||||
|
else
|
||||||
|
displaynotification "Installing $name" "Installation in progress …"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$installerTool" ]; then
|
||||||
|
# installerTool defined, and we use that for installation
|
||||||
|
printlog "installerTool used: $installerTool"
|
||||||
|
appName="$installerTool"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $type in
|
case $type in
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.8.0
|
9.0dev
|
||||||
|
|||||||
@@ -10,6 +10,94 @@ downloadURL=${1?:"need to provide a download URL."}
|
|||||||
# Usage
|
# Usage
|
||||||
# ./buildLabel.sh <URL to download software>
|
# ./buildLabel.sh <URL to download software>
|
||||||
|
|
||||||
|
# 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
|
# Use working directory as download folder
|
||||||
tmpDir="$(pwd)/$(date "+%Y-%m-%d-%H-%M-%S")"
|
tmpDir="$(pwd)/$(date "+%Y-%m-%d-%H-%M-%S")"
|
||||||
# Create a n almost unique folder name
|
# Create a n almost unique folder name
|
||||||
@@ -23,57 +111,48 @@ if ! cd "$tmpDir"; then
|
|||||||
fi
|
fi
|
||||||
echo "Working dir: $(pwd)"
|
echo "Working dir: $(pwd)"
|
||||||
|
|
||||||
# download the URL
|
# investigate and download the URL
|
||||||
echo "Downloading $downloadURL"
|
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
|
if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then
|
||||||
echo "error downloading $downloadURL"
|
echo "error downloading $downloadURL using standard headers."
|
||||||
exit 2
|
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
|
fi
|
||||||
|
|
||||||
xpath() {
|
# Now we have downloaded the archive, and we need to analyze this
|
||||||
# the xpath tool changes in Big Sur and now requires the `-e` option
|
# The download have returned both {filename_effective} and {url_effective}
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
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 )
|
archiveTempName=$( echo "${downloadOut}" | head -1 )
|
||||||
echo "archiveTempName: $archiveTempName"
|
echo "archiveTempName: $archiveTempName"
|
||||||
archivePath=$( echo "${downloadOut}" | tail -1 )
|
archivePath=$( echo "${downloadOut}" | tail -1 )
|
||||||
echo "archivePath: $archivePath"
|
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##*/}%%\?*}
|
try1archiveName=${${archiveTempName##*/}%%\?*}
|
||||||
try2archiveName=${${archivePath##*/}%%\?*}
|
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
|
if [[ "${try1archiveName}" =~ $fileName_re ]]; then
|
||||||
archiveName=${try1archiveName}
|
archiveName=${try1archiveName}
|
||||||
elif [[ "${try2archiveName}" =~ $fileName_re ]]; then
|
elif [[ "${try2archiveName}" =~ $fileName_re ]]; then
|
||||||
@@ -81,22 +160,26 @@ elif [[ "${try2archiveName}" =~ $fileName_re ]]; then
|
|||||||
else
|
else
|
||||||
echo "Could not determine archiveName from “$try1archiveName” and “$try2archiveName”"
|
echo "Could not determine archiveName from “$try1archiveName” and “$try2archiveName”"
|
||||||
#echo "Extensions $archiveTempName:t:e $archivePath:t:e"
|
#echo "Extensions $archiveTempName:t:e $archivePath:t:e"
|
||||||
exit
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# So we found a filename, and now we want to detect the extension and other information
|
||||||
echo "Calculated archiveName: $archiveName"
|
echo "Calculated archiveName: $archiveName"
|
||||||
mv $archiveTempName $archiveName
|
mv $archiveTempName $archiveName
|
||||||
name=${archiveName%.*}
|
name=${archiveName%.*}
|
||||||
echo "name: $name"
|
echo "name: $name"
|
||||||
archiveExt=${archiveName##*.}
|
archiveExt=${archiveName##*.}
|
||||||
|
type=$archiveExt
|
||||||
echo "archiveExt: $archiveExt"
|
echo "archiveExt: $archiveExt"
|
||||||
identifier=${name:l}
|
identifier=${name:l} # making lower case
|
||||||
identifier=${identifier//\%[0-9a-fA-F][0-9a-fA-F]}
|
identifier=${identifier//\%[0-9a-fA-F][0-9a-fA-F]} # removing certain characters
|
||||||
identifier=${identifier//[,._*@$\(\)\-]}
|
identifier=${identifier//[,._*@$\(\)\-]} # removing more characters from label name
|
||||||
echo "identifier: $identifier"
|
echo "identifier: $identifier"
|
||||||
|
|
||||||
|
# Now figuring out the filename extension and handling those situations
|
||||||
if [ "$archiveExt" = "pkg" ]; then
|
if [ "$archiveExt" = "pkg" ]; then
|
||||||
pkgPath="$archiveName"
|
pkgPath="$archiveName"
|
||||||
|
echo "PKG found: $pkgPath"
|
||||||
pkgInvestigation
|
pkgInvestigation
|
||||||
elif [ "$archiveExt" = "dmg" ]; then
|
elif [ "$archiveExt" = "dmg" ]; then
|
||||||
echo "Diskimage found"
|
echo "Diskimage found"
|
||||||
@@ -108,15 +191,20 @@ elif [ "$archiveExt" = "dmg" ]; then
|
|||||||
fi
|
fi
|
||||||
echo "Mounted: $dmgmount"
|
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 )
|
appPath=$(find "$dmgmount" -name "*.app" -maxdepth 1 -print )
|
||||||
pkgPath=$(find "$dmgmount" -name "*.pkg" -maxdepth 1 -print )
|
pkgPath=$(find "$dmgmount" -name "*.pkg" -maxdepth 1 -print )
|
||||||
|
|
||||||
if [[ $appPath != "" ]]; then
|
if [[ $appPath != "" ]]; then
|
||||||
|
echo "App found: $appPath"
|
||||||
appInvestigation
|
appInvestigation
|
||||||
elif [[ $pkgPath != "" ]]; then
|
elif [[ $pkgPath != "" ]]; then
|
||||||
|
echo "PKG found: $pkgPath"
|
||||||
archiveExt="pkgInDmg"
|
archiveExt="pkgInDmg"
|
||||||
pkgInvestigation
|
pkgInvestigation
|
||||||
|
else
|
||||||
|
echo "Nothing found on DMG."
|
||||||
|
exit 9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
hdiutil detach "$dmgmount"
|
hdiutil detach "$dmgmount"
|
||||||
@@ -125,43 +213,141 @@ elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then
|
|||||||
# unzip the archive
|
# unzip the archive
|
||||||
tar -xf "$archiveName"
|
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 )
|
appPath=$(find "$tmpDir" -name "*.app" -maxdepth 2 -print )
|
||||||
pkgPath=$(find "$tmpDir" -name "*.pkg" -maxdepth 2 -print )
|
pkgPath=$(find "$tmpDir" -name "*.pkg" -maxdepth 2 -print )
|
||||||
|
|
||||||
if [[ $appPath != "" ]]; then
|
if [[ $appPath != "" ]]; then
|
||||||
|
echo "App found: $appPath"
|
||||||
appInvestigation
|
appInvestigation
|
||||||
elif [[ $pkgPath != "" ]]; then
|
elif [[ $pkgPath != "" ]]; then
|
||||||
|
echo "PKG found: $pkgPath"
|
||||||
archiveExt="pkgInZip"
|
archiveExt="pkgInZip"
|
||||||
pkgInvestigation
|
pkgInvestigation
|
||||||
|
else
|
||||||
|
echo "Nothing found in compressed archive."
|
||||||
|
exit 9
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
# github-part to figure out if we can find author and repo, to use our github functions for the label
|
||||||
echo "**********"
|
if echo "$downloadURL" | grep -i "github.com.*releases/download"; then
|
||||||
echo
|
echo "\n**********\n\nFound GitHub path"
|
||||||
echo "Labels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed."
|
githubAuthor=$(echo "$downloadURL" | cut -d "/" -f4)
|
||||||
echo
|
githubRepo=$(echo "$downloadURL" | cut -d "/" -f5)
|
||||||
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"
|
if [[ ! -z $githubAuthor && $githubRepo ]] ; then
|
||||||
echo
|
githubError=9
|
||||||
echo "$identifier)"
|
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 " name=\"$name\""
|
||||||
echo " type=\"$archiveExt\""
|
echo " type=\"$archiveExt\""
|
||||||
if [ "$packageID" != "" ]; then
|
if [ -n "$packageID" ]; then
|
||||||
echo " packageID=\"$packageID\""
|
echo " packageID=\"$packageID\""
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$archiveDestinationName" ]; then
|
||||||
|
echo " archiveName=\"$archiveDestinationName\""
|
||||||
|
fi
|
||||||
echo " downloadURL=\"$downloadURL\""
|
echo " downloadURL=\"$downloadURL\""
|
||||||
echo " appNewVersion=\"\""
|
echo " appNewVersion=\"$appNewVersion\""
|
||||||
echo " expectedTeamID=\"$teamID\""
|
echo " expectedTeamID=\"$teamID\""
|
||||||
if [ -n "$appName" ] && [ "$appName" != "${name}.app" ]; then
|
if [ -n "$appName" ] && [ "$appName" != "${name}.app" ]; then
|
||||||
echo " appName=\"$appName\""
|
echo " appName=\"$appName\""
|
||||||
fi
|
fi
|
||||||
echo " ;;"
|
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"
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
|||||||
|
|
||||||
|
|
||||||
# MARK: Constants
|
# MARK: Constants
|
||||||
pathToLabels="fragments/labels"
|
|
||||||
|
|
||||||
if [[ ! -d ${pathToLabels} ]]; then
|
#setup some folders
|
||||||
echo "This script should be called from Installomator directory as working directory with this command:"
|
script_dir=$(dirname ${0:A})
|
||||||
echo "utils/checkLabels.sh"
|
repo_dir=$(dirname $script_dir)
|
||||||
echo
|
build_dir="$repo_dir/build"
|
||||||
exit 99
|
destination_file="$build_dir/Installomator.sh"
|
||||||
fi
|
fragments_dir="$repo_dir/fragments"
|
||||||
|
labels_dir="$fragments_dir/labels"
|
||||||
|
|
||||||
# MARK: Check minimal macOS requirement
|
# MARK: Check minimal macOS requirement
|
||||||
if [[ $(sw_vers -buildVersion ) < "18" ]]; then
|
if [[ $(sw_vers -buildVersion ) < "18" ]]; then
|
||||||
@@ -98,11 +98,11 @@ BLUE='\033[1;34m'
|
|||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
# Labels with the $(arch) call for different versions for Intel and Apple Silicon should be listed here:
|
# 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"
|
echo "${BLUE}Labels with \"\$(arch)\" call:${NC}\n${archLabels}\n"
|
||||||
|
|
||||||
if [[ $# -eq 0 ]]; then
|
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
|
else
|
||||||
allLabels=( ${=@} )
|
allLabels=( ${=@} )
|
||||||
fi
|
fi
|
||||||
@@ -122,7 +122,7 @@ for label in $allLabels; do
|
|||||||
name=""; type=""; downloadURL=""; appNewVersion=""; expectedTeamID=""; blockingProcesses=""; updateTool=""; updateToolArguments=""; archiveName=""
|
name=""; type=""; downloadURL=""; appNewVersion=""; expectedTeamID=""; blockingProcesses=""; updateTool=""; updateToolArguments=""; archiveName=""
|
||||||
|
|
||||||
#caseLabel
|
#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
|
source checkLabelCurrent.sh
|
||||||
|
|
||||||
echo "Name: $name"
|
echo "Name: $name"
|
||||||
|
|||||||
Reference in New Issue
Block a user