The ls command to check for this file will throw an error when the file does not exist. Better to simply test for the file (with size greater than zero).
Will now also go through labels with warnings in the, to figure out if the label works. Many warnings are about version checking, so those will be verified now.
Moved the variable declarations from `functions.sh` to `arguments.sh`. We need the argument parsing before setting the logging level and other variables.
This script will check certain labels. It's meant to check all (or most) of Installomator, to see if the code is working. We need labels that are representative for alle the functionality in the script.
(Bug-fix for LSMinimumSystemVersion is needed for some of these to work)
If `versionKey` is used as part of `valuesfromarguments` it will currently be replaced by our standard value `CFBundleShortVersionString` (it was only testet on labels). So added an `if...then` to know if it was already set as part of the arguments.
Also improved logging to show what `versionKey` is.
When I created PR #374, the sparkle feed had just one entry. Turns out, that Docker uses the last entry of the feed for the latest version.
With simply changing xpath to use `[last()]`, the version checking now behaves as expected.
Improved first lines of logs to be required and show `VERSION` and `VERSIONDATE` on separate lines.
Logging sent to Datadog will have `VERSION` on each line.
URLs for version checking have changed. It's now using the `shortVersionString` from the sparkle feed.
Example run for M1:
```
$ sudo zsh Installomator.sh docker DEBUG=0
2022-01-12 18:16:35 docker setting variable from argument DEBUG=0
2022-01-12 18:16:35 docker ################## Start Installomator v. 8.0
2022-01-12 18:16:35 docker ################## docker
2022-01-12 18:16:35 docker BLOCKING_PROCESS_ACTION=tell_user
2022-01-12 18:16:35 docker NOTIFY=success
2022-01-12 18:16:35 docker LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-01-12 18:16:35 docker no blocking processes defined, using Docker as default
2022-01-12 18:16:35 docker Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.t4N46qTN
2022-01-12 18:16:35 docker App(s) found: /Applications/Docker.app
2022-01-12 18:16:35 docker found app at /Applications/Docker.app, version 4.3.2
2022-01-12 18:16:35 docker appversion: 4.3.2
2022-01-12 18:16:35 docker Latest version of Docker is 4.3.2
2022-01-12 18:16:35 docker There is no newer version available.
2022-01-12 18:16:35 docker Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.t4N46qTN
2022-01-12 18:16:35 docker App not closed, so no reopen.
2022-01-12 18:16:35 docker ################## End Installomator, exit code 0
```
Improvements to logging:
- Logging levels as DEBUG 0 INFO 1 WARN 2 ERROR 3 REQ 4
- External logging to Datadog
- A function to shorten duplicate lines in installation logs
- Ability to extract install.log in the time when Installomator was running, if further investigations needs to be done to logs
In `logitechoptions` we do not know what the app-name is that contains the pkg in the bundle-package, so now we only give the name of the pkg, and then Installomator will find it.
Now return one `#` when unknown label is given, not a whole bunch of them.
```
Installomator/utils/assemble.sh strangelabel RETURN_LABEL_NAME=1 DEBUG=0 | tail -1
#
```
Improved buildLabel.sh to handle another set of headers when trying to download, and that can handle the mocha-software.
But mocha-software has been disabled, as Installomator does not offer the headers when that is trying to download.
If an app has `LSMinimumSystemVersion` in the `Info.plist`, then we will check if the installed macOS lives up to this, and exit if not.
First a normal run on Monterey:
```
Installomator/utils/assemble.sh omnidisksweeper DEBUG=0 INSTALL=force
2022-01-07 13:37:43 omnidisksweeper setting variable from argument DEBUG=0
2022-01-07 13:37:43 omnidisksweeper setting variable from argument INSTALL=force
2022-01-07 13:37:43 omnidisksweeper ################## Start Installomator v. 9.0dev
2022-01-07 13:37:43 omnidisksweeper ################## omnidisksweeper
2022-01-07 13:37:44 omnidisksweeper BLOCKING_PROCESS_ACTION=tell_user
2022-01-07 13:37:44 omnidisksweeper NOTIFY=success
2022-01-07 13:37:44 omnidisksweeper LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-01-07 13:37:44 omnidisksweeper no blocking processes defined, using OmniDiskSweeper as default
2022-01-07 13:37:44 omnidisksweeper Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.41qqoUEN
2022-01-07 13:37:44 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 13:37:44 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 13:37:44 omnidisksweeper appversion: 1.13
2022-01-07 13:37:44 omnidisksweeper Using force to install, so not using updateTool.
2022-01-07 13:37:44 omnidisksweeper Latest version of OmniDiskSweeper is 1.13
2022-01-07 13:37:44 omnidisksweeper There is no newer version available.
2022-01-07 13:37:44 omnidisksweeper Downloading https://downloads.omnigroup.com/software/MacOSX/10.14/OmniDiskSweeper-1.13.dmg to OmniDiskSweeper.dmg
2022-01-07 13:37:45 omnidisksweeper no more blocking processes, continue with update
2022-01-07 13:37:45 omnidisksweeper Installing OmniDiskSweeper
2022-01-07 13:37:45 omnidisksweeper Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.41qqoUEN/OmniDiskSweeper.dmg
2022-01-07 13:37:46 omnidisksweeper Mounted: /Volumes/OmniDiskSweeper
2022-01-07 13:37:46 omnidisksweeper Verifying: /Volumes/OmniDiskSweeper/OmniDiskSweeper.app
2022-01-07 13:37:49 omnidisksweeper Team ID matching: 34YW5XSRB7 (expected: 34YW5XSRB7 )
2022-01-07 13:37:49 omnidisksweeper App has LSMinimumSystemVersion: 10.14
2022-01-07 13:37:49 omnidisksweeper Downloaded version of OmniDiskSweeper is 1.13, same as installed.
2022-01-07 13:37:49 omnidisksweeper Using force to install anyway.
2022-01-07 13:37:49 omnidisksweeper Removing existing /Applications/OmniDiskSweeper.app
2022-01-07 13:37:49 omnidisksweeper Copy /Volumes/OmniDiskSweeper/OmniDiskSweeper.app to /Applications
2022-01-07 13:37:49 omnidisksweeper Changing owner to st
2022-01-07 13:37:49 omnidisksweeper Finishing...
2022-01-07 13:37:59 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 13:37:59 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 13:37:59 omnidisksweeper Installed OmniDiskSweeper, version 1.13
2022-01-07 13:37:59 omnidisksweeper notifying
2022-01-07 13:37:59 omnidisksweeper Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.41qqoUEN
2022-01-07 13:37:59 omnidisksweeper Unmounting /Volumes/OmniDiskSweeper
"disk4" ejected.
2022-01-07 13:38:00 omnidisksweeper App not closed, so no reopen.
2022-01-07 13:38:00 omnidisksweeper ################## End Installomator, exit code 0
```
Trying where I manually change OS version to 10.13:
```
Installomator/utils/assemble.sh omnidisksweeper DEBUG=0 INSTALL=force
2022-01-07 13:38:39 omnidisksweeper setting variable from argument DEBUG=0
2022-01-07 13:38:39 omnidisksweeper setting variable from argument INSTALL=force
2022-01-07 13:38:39 omnidisksweeper ################## Start Installomator v. 9.0dev
2022-01-07 13:38:39 omnidisksweeper ################## omnidisksweeper
2022-01-07 13:38:39 omnidisksweeper BLOCKING_PROCESS_ACTION=tell_user
2022-01-07 13:38:39 omnidisksweeper NOTIFY=success
2022-01-07 13:38:39 omnidisksweeper LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-01-07 13:38:39 omnidisksweeper no blocking processes defined, using OmniDiskSweeper as default
2022-01-07 13:38:39 omnidisksweeper Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.PXjTfPiA
2022-01-07 13:38:39 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app
2022-01-07 13:38:39 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13
2022-01-07 13:38:40 omnidisksweeper appversion: 1.13
2022-01-07 13:38:40 omnidisksweeper Using force to install, so not using updateTool.
2022-01-07 13:38:40 omnidisksweeper Latest version of OmniDiskSweeper is 1.13
2022-01-07 13:38:40 omnidisksweeper There is no newer version available.
2022-01-07 13:38:40 omnidisksweeper Downloading https://downloads.omnigroup.com/software/MacOSX/10.14/OmniDiskSweeper-1.13.dmg to OmniDiskSweeper.dmg
2022-01-07 13:38:40 omnidisksweeper no more blocking processes, continue with update
2022-01-07 13:38:40 omnidisksweeper Installing OmniDiskSweeper
2022-01-07 13:38:40 omnidisksweeper Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.PXjTfPiA/OmniDiskSweeper.dmg
2022-01-07 13:38:41 omnidisksweeper Mounted: /Volumes/OmniDiskSweeper
2022-01-07 13:38:41 omnidisksweeper Verifying: /Volumes/OmniDiskSweeper/OmniDiskSweeper.app
2022-01-07 13:38:43 omnidisksweeper Team ID matching: 34YW5XSRB7 (expected: 34YW5XSRB7 )
2022-01-07 13:38:43 omnidisksweeper App has LSMinimumSystemVersion: 10.14
2022-01-07 13:38:43 omnidisksweeper App requires higher System Version than installed: 10.13
2022-01-07 13:38:43 omnidisksweeper ERROR: Installed macOS is too old for this app.
2022-01-07 13:38:43 omnidisksweeper Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.PXjTfPiA
2022-01-07 13:38:43 omnidisksweeper Unmounting /Volumes/OmniDiskSweeper
"disk4" ejected.
2022-01-07 13:38:43 omnidisksweeper App not closed, so no reopen.
2022-01-07 13:38:43 omnidisksweeper ################## End Installomator, exit code 6
```
When using DEPNotify I would like Installomator to return a nice name for the label to show as status in DEPNotify, instead of only the label name.
This way we can do that.
And maybe in the fute include a description of the software, if people are seeking inspiration to software by looking at Installomator (that contains a lot of preferred solution for many)
Currently (before this patch) a label like `microsoftonedrive` that was installed from App Store, and that we want to replace with the “ordinary” version, Installomator would use updateTool, even though `IGNORE_APP_STORE_APPS=yes`. So we would have to have `INSTALL=force` in order to have the app replaced, as `updateTool` would be used.
With this patch, if `IGNORE_APP_STORE_APPS=yes` then `updateTool` will be not set, and the App Store app would be replaced. But if the installed software was not from App Store, then `updateTool` would not be used, and it would be a kind of a forced install (except if the version is the same).
I have this output:
```
➜ Downloads sudo Installomator/utils/assemble.sh microsoftonedrive DEBUG=0
2021-11-30 10:12:11 microsoftonedrive setting variable from argument DEBUG=0
2021-11-30 10:12:11 microsoftonedrive ################## Start Installomator v. 9.0dev
2021-11-30 10:12:11 microsoftonedrive ################## microsoftonedrive
2021-11-30 10:12:13 microsoftonedrive Running msupdate --list
Checking for updates...
Update Assistant is available.
Update Assistant is checking for updates.
Update Assistant is available.
No updates available
2021-11-30 10:12:27 microsoftonedrive BLOCKING_PROCESS_ACTION=tell_user
2021-11-30 10:12:27 microsoftonedrive NOTIFY=success
2021-11-30 10:12:27 microsoftonedrive LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-11-30 10:12:27 microsoftonedrive no blocking processes defined, using OneDrive as default
2021-11-30 10:12:27 microsoftonedrive Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.5kJ1YWMy
2021-11-30 10:12:27 microsoftonedrive App(s) found: /Applications/OneDrive.app
2021-11-30 10:12:27 microsoftonedrive found app at /Applications/OneDrive.app, version 21.220.1024
2021-11-30 10:12:27 microsoftonedrive Installed OneDrive.app is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace.
2021-11-30 10:12:27 microsoftonedrive ERROR: App previously installed from App Store, and we respect that
2021-11-30 10:12:27 microsoftonedrive Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.5kJ1YWMy
2021-11-30 10:12:27 microsoftonedrive App not closed, so no reopen.
2021-11-30 10:12:27 microsoftonedrive ################## End Installomator, exit code 1
➜ Downloads sudo Installomator/utils/assemble.sh microsoftonedrive DEBUG=0 IGNORE_APP_STORE_APPS=yes
2021-11-30 10:12:50 microsoftonedrive setting variable from argument DEBUG=0
2021-11-30 10:12:50 microsoftonedrive setting variable from argument IGNORE_APP_STORE_APPS=yes
2021-11-30 10:12:50 microsoftonedrive ################## Start Installomator v. 9.0dev
2021-11-30 10:12:50 microsoftonedrive ################## microsoftonedrive
2021-11-30 10:12:51 microsoftonedrive Running msupdate --list
Checking for updates...
Update Assistant is available.
Update Assistant is checking for updates.
Update Assistant is available.
No updates available
2021-11-30 10:13:06 microsoftonedrive BLOCKING_PROCESS_ACTION=tell_user
2021-11-30 10:13:06 microsoftonedrive NOTIFY=success
2021-11-30 10:13:06 microsoftonedrive LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-11-30 10:13:06 microsoftonedrive no blocking processes defined, using OneDrive as default
2021-11-30 10:13:06 microsoftonedrive Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.OXbBLX0y
2021-11-30 10:13:06 microsoftonedrive App(s) found: /Applications/OneDrive.app
2021-11-30 10:13:06 microsoftonedrive found app at /Applications/OneDrive.app, version 21.220.1024
2021-11-30 10:13:06 microsoftonedrive Installed OneDrive.app is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace.
2021-11-30 10:13:06 microsoftonedrive Replacing App Store apps, no matter the version
2021-11-30 10:13:06 microsoftonedrive appversion: 0
2021-11-30 10:13:06 microsoftonedrive Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool.
2021-11-30 10:13:06 microsoftonedrive Latest version of OneDrive is 21.205.1003
2021-11-30 10:13:06 microsoftonedrive Downloading https://go.microsoft.com/fwlink/?linkid=823060 to OneDrive.pkg
2021-11-30 10:15:01 microsoftonedrive no more blocking processes, continue with update
2021-11-30 10:15:01 microsoftonedrive Installing OneDrive
2021-11-30 10:15:01 microsoftonedrive Verifying: OneDrive.pkg
2021-11-30 10:15:02 microsoftonedrive Team ID: UBF8T346G9 (expected: UBF8T346G9 )
2021-11-30 10:15:02 microsoftonedrive Installing OneDrive.pkg to /
installer: Package name is Microsoft OneDrive
installer: Upgrading at base path /
installer: The upgrade was successful.
2021-11-30 10:15:08 microsoftonedrive Finishing...
2021-11-30 10:15:18 microsoftonedrive App(s) found: /Applications/OneDrive.app
2021-11-30 10:15:18 microsoftonedrive found app at /Applications/OneDrive.app, version 21.220.1024
2021-11-30 10:15:18 microsoftonedrive Installed OneDrive.app is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace.
2021-11-30 10:15:18 microsoftonedrive Replacing App Store apps, no matter the version
2021-11-30 10:15:18 microsoftonedrive Installed OneDrive, version 0
2021-11-30 10:15:18 microsoftonedrive notifying
2021-11-30 10:15:18 microsoftonedrive Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.OXbBLX0y
2021-11-30 10:15:18 microsoftonedrive App not closed, so no reopen.
2021-11-30 10:15:18 microsoftonedrive ################## End Installomator, exit code 0
```
Now we can call any script on the root of the path where `appName` is found.
Same result:
```
2021-11-10 15:58:02 adobecreativeclouddesktop setting variable from argument DEBUG=0
2021-11-10 15:58:02 adobecreativeclouddesktop setting variable from argument INSTALL=force
2021-11-10 15:58:02 adobecreativeclouddesktop ################## Start Installomator v. 0.8.0
2021-11-10 15:58:02 adobecreativeclouddesktop ################## adobecreativeclouddesktop
2021-11-10 15:58:03 adobecreativeclouddesktop BLOCKING_PROCESS_ACTION=tell_user
2021-11-10 15:58:03 adobecreativeclouddesktop NOTIFY=success
2021-11-10 15:58:03 adobecreativeclouddesktop LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-11-10 15:58:03 adobecreativeclouddesktop no blocking processes defined, using Creative Cloud as default
2021-11-10 15:58:03 adobecreativeclouddesktop Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.WNV7B1pH
2021-11-10 15:58:03 adobecreativeclouddesktop App(s) found: /Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Install.app
2021-11-10 15:58:03 adobecreativeclouddesktop could not determine location of Install.app
2021-11-10 15:58:03 adobecreativeclouddesktop appversion:
2021-11-10 15:58:03 adobecreativeclouddesktop Latest version of Creative Cloud is 5.6.0.788
2021-11-10 15:58:03 adobecreativeclouddesktop Downloading https://ccmdl.adobe.com/AdobeProducts/KCCC/CCD/5_6_0/macarm64/ACCCx5_6_0_788.dmg to Creative Cloud.dmg
2021-11-10 15:58:17 adobecreativeclouddesktop no more blocking processes, continue with update
2021-11-10 15:58:17 adobecreativeclouddesktop Installing Creative Cloud
2021-11-10 15:58:17 adobecreativeclouddesktop Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.WNV7B1pH/Creative Cloud.dmg
2021-11-10 15:58:18 adobecreativeclouddesktop Mounted: /Volumes/Creative Cloud
2021-11-10 15:58:18 adobecreativeclouddesktop Verifying: /Volumes/Creative Cloud/Install.app
2021-11-10 15:58:18 adobecreativeclouddesktop Team ID matching: JQ525L2MZD (expected: JQ525L2MZD )
2021-11-10 15:58:18 adobecreativeclouddesktop Downloaded version of Creative Cloud is 2.6.0.46 (replacing version ).
2021-11-10 15:58:18 adobecreativeclouddesktop CLIInstaller exists, running installer command /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install --mode=silent
2021-11-10 15:58:23 adobecreativeclouddesktop Succesfully ran /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install --mode=silent
2021-11-10 15:58:23 adobecreativeclouddesktop Debugging enabled, update tool output was:
objc[20055]: Class HTTPHeader is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102565018) and /Library/Application Support/Adobe/Adobe Desktop Common/Core/AdobePIM.dylib (0x10f2f0790). One of the two will be used. Which one is undefined.
objc[20055]: Class ProxyManager is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102565068) and /Library/Application Support/Adobe/Adobe Desktop Common/Core/AdobePIM.dylib (0x10f2f07e0). One of the two will be used. Which one is undefined.
objc[20055]: Class HTTPHeader is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102565018) and /Volumes/Creative Cloud/resources/AdobePIM.dylib (0x110302790). One of the two will be used. Which one is undefined.
objc[20055]: Class ProxyManager is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102565068) and /Volumes/Creative Cloud/resources/AdobePIM.dylib (0x1103027e0). One of the two will be used. Which one is undefined.
Starting installer...
Installation successful.
2021-11-10 15:58:23 adobecreativeclouddesktop Finishing…
2021-11-10 15:58:33 adobecreativeclouddesktop App(s) found: /Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Install.app
2021-11-10 15:58:33 adobecreativeclouddesktop could not determine location of Install.app
2021-11-10 15:58:33 adobecreativeclouddesktop Installed Creative Cloud
2021-11-10 15:58:33 adobecreativeclouddesktop notifying
2021-11-10 15:58:33 adobecreativeclouddesktop Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.WNV7B1pH
2021-11-10 15:58:33 adobecreativeclouddesktop Unmounting /Volumes/Creative Cloud
"disk5" ejected.
2021-11-10 15:58:33 adobecreativeclouddesktop App not closed, so no reopen.
2021-11-10 15:58:33 adobecreativeclouddesktop ################## End Installomator, exit code 0
```
Changes to the label, so path to CLIInstaller does not contain the name of the app, as that is already in the variable `appPath`.
Still needing to decide on debug logging or what kind of message we want there.
But this is succesfull:
```
% sudo /Users/st/Documents/GitHub/Installomator/utils/assemble.sh -r adobecreativeclouddesktop DEBUG=0 INSTALL=force
Password:
2021-11-10 11:30:51 adobecreativeclouddesktop setting variable from argument DEBUG=0
2021-11-10 11:30:51 adobecreativeclouddesktop setting variable from argument INSTALL=force
2021-11-10 11:30:51 adobecreativeclouddesktop ################## Start Installomator v. 0.8.0
2021-11-10 11:30:51 adobecreativeclouddesktop ################## adobecreativeclouddesktop
2021-11-10 11:30:51 adobecreativeclouddesktop BLOCKING_PROCESS_ACTION=tell_user
2021-11-10 11:30:51 adobecreativeclouddesktop NOTIFY=success
2021-11-10 11:30:52 adobecreativeclouddesktop LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-11-10 11:30:52 adobecreativeclouddesktop no blocking processes defined, using Creative Cloud as default
2021-11-10 11:30:52 adobecreativeclouddesktop Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.wMH45Qfi
2021-11-10 11:30:52 adobecreativeclouddesktop App(s) found: /Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Install.app
2021-11-10 11:30:52 adobecreativeclouddesktop could not determine location of Install.app
2021-11-10 11:30:52 adobecreativeclouddesktop appversion:
2021-11-10 11:30:52 adobecreativeclouddesktop Latest version of Creative Cloud is 5.6.0.788
2021-11-10 11:30:52 adobecreativeclouddesktop Downloading https://ccmdl.adobe.com/AdobeProducts/KCCC/CCD/5_6_0/macarm64/ACCCx5_6_0_788.dmg to Creative Cloud.dmg
2021-11-10 11:31:41 adobecreativeclouddesktop no more blocking processes, continue with update
2021-11-10 11:31:41 adobecreativeclouddesktop Installing Creative Cloud
2021-11-10 11:31:41 adobecreativeclouddesktop Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.wMH45Qfi/Creative Cloud.dmg
2021-11-10 11:31:42 adobecreativeclouddesktop Mounted: /Volumes/Creative Cloud 2
2021-11-10 11:31:42 adobecreativeclouddesktop Verifying: /Volumes/Creative Cloud 2/Install.app
2021-11-10 11:31:42 adobecreativeclouddesktop Team ID matching: JQ525L2MZD (expected: JQ525L2MZD )
2021-11-10 11:31:42 adobecreativeclouddesktop Downloaded version of Creative Cloud is 2.6.0.46 (replacing version ).
2021-11-10 11:31:42 adobecreativeclouddesktop CLIInstaller exists, running installer command /Volumes/Creative Cloud 2/Install.app/Contents/MacOS/Install --mode=silent
2021-11-10 11:31:46 adobecreativeclouddesktop Succesfully ran /Volumes/Creative Cloud 2/Install.app/Contents/MacOS/Install --mode=silent
2021-11-10 11:31:46 adobecreativeclouddesktop Debugging enabled, update tool output was:
objc[71312]: Class HTTPHeader is implemented in both /Volumes/Creative Cloud 2/Install.app/Contents/MacOS/Install (0x100c2f018) and /Library/Application Support/Adobe/Adobe Desktop Common/Core/AdobePIM.dylib (0x10dc38790). One of the two will be used. Which one is undefined.
objc[71312]: Class ProxyManager is implemented in both /Volumes/Creative Cloud 2/Install.app/Contents/MacOS/Install (0x100c2f068) and /Library/Application Support/Adobe/Adobe Desktop Common/Core/AdobePIM.dylib (0x10dc387e0). One of the two will be used. Which one is undefined.
objc[71312]: Class HTTPHeader is implemented in both /Volumes/Creative Cloud 2/Install.app/Contents/MacOS/Install (0x100c2f018) and /Volumes/Creative Cloud 2/resources/AdobePIM.dylib (0x10e4e6790). One of the two will be used. Which one is undefined.
objc[71312]: Class ProxyManager is implemented in both /Volumes/Creative Cloud 2/Install.app/Contents/MacOS/Install (0x100c2f068) and /Volumes/Creative Cloud 2/resources/AdobePIM.dylib (0x10e4e67e0). One of the two will be used. Which one is undefined.
Starting installer...
Installation successful.
2021-11-10 11:31:46 adobecreativeclouddesktop Finishing…
2021-11-10 11:31:56 adobecreativeclouddesktop App(s) found: /Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Install.app
2021-11-10 11:31:56 adobecreativeclouddesktop could not determine location of Install.app
2021-11-10 11:31:56 adobecreativeclouddesktop Installed Creative Cloud
2021-11-10 11:31:56 adobecreativeclouddesktop notifying
2021-11-10 11:31:56 adobecreativeclouddesktop Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.wMH45Qfi
2021-11-10 11:31:56 adobecreativeclouddesktop Unmounting /Volumes/Creative Cloud 2
"disk6" ejected.
2021-11-10 11:31:57 adobecreativeclouddesktop App not closed, so no reopen.
2021-11-10 11:31:57 adobecreativeclouddesktop ################## End Installomator, exit code 0
```
I was looking into installing Adobe CC fully (Isaac has done the hard part), and we can add `CLIInstaller` and `CLIArguments` to get it fully installed.
This implementation is slightly changed from Isaacs.
```
% sudo /Users/st/Documents/GitHub/Installomator/utils/assemble.sh -r adobecreativeclouddesktop DEBUG=0 INSTALL=force
2021-11-10 08:56:00 adobecreativeclouddesktop setting variable from argument DEBUG=0
2021-11-10 08:56:00 adobecreativeclouddesktop setting variable from argument INSTALL=force
2021-11-10 08:56:00 adobecreativeclouddesktop ################## Start Installomator v. 0.8.0
2021-11-10 08:56:00 adobecreativeclouddesktop ################## adobecreativeclouddesktop
2021-11-10 08:56:00 adobecreativeclouddesktop BLOCKING_PROCESS_ACTION=tell_user
2021-11-10 08:56:00 adobecreativeclouddesktop NOTIFY=success
2021-11-10 08:56:00 adobecreativeclouddesktop LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-11-10 08:56:00 adobecreativeclouddesktop no blocking processes defined, using Creative Cloud as default
2021-11-10 08:56:00 adobecreativeclouddesktop Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.0LNrXCQX
2021-11-10 08:56:01 adobecreativeclouddesktop App(s) found: /Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Install.app
2021-11-10 08:56:01 adobecreativeclouddesktop could not determine location of Install.app
2021-11-10 08:56:01 adobecreativeclouddesktop appversion:
2021-11-10 08:56:01 adobecreativeclouddesktop Latest version of Creative Cloud is 5.6.0.788
2021-11-10 08:56:01 adobecreativeclouddesktop Downloading https://ccmdl.adobe.com/AdobeProducts/KCCC/CCD/5_6_0/macarm64/ACCCx5_6_0_788.dmg to Creative Cloud.dmg
2021-11-10 08:56:30 adobecreativeclouddesktop no more blocking processes, continue with update
2021-11-10 08:56:30 adobecreativeclouddesktop Installing Creative Cloud
2021-11-10 08:56:30 adobecreativeclouddesktop Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.0LNrXCQX/Creative Cloud.dmg
2021-11-10 08:56:30 adobecreativeclouddesktop Mounted: /Volumes/Creative Cloud
2021-11-10 08:56:30 adobecreativeclouddesktop Verifying: /Volumes/Creative Cloud/Install.app
2021-11-10 08:56:30 adobecreativeclouddesktop Team ID matching: JQ525L2MZD (expected: JQ525L2MZD )
2021-11-10 08:56:30 adobecreativeclouddesktop Downloaded version of Creative Cloud is 2.6.0.46 (replacing version ).
2021-11-10 08:56:30 adobecreativeclouddesktop CLIInstaller exists, running installer command /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install --mode=silent
2021-11-10 08:56:34 adobecreativeclouddesktop Debugging enabled, update tool output was: objc[51900]: Class HTTPHeader is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102d2a018) and /Library/Application Support/Adobe/Adobe Desktop Common/Core/AdobePIM.dylib (0x10fa75790). One of the two will be used. Which one is undefined.
objc[51900]: Class ProxyManager is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102d2a068) and /Library/Application Support/Adobe/Adobe Desktop Common/Core/AdobePIM.dylib (0x10fa757e0). One of the two will be used. Which one is undefined.
objc[51900]: Class HTTPHeader is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102d2a018) and /Volumes/Creative Cloud/resources/AdobePIM.dylib (0x110a87790). One of the two will be used. Which one is undefined.
objc[51900]: Class ProxyManager is implemented in both /Volumes/Creative Cloud/Install.app/Contents/MacOS/Install (0x102d2a068) and /Volumes/Creative Cloud/resources/AdobePIM.dylib (0x110a877e0). One of the two will be used. Which one is undefined.
Starting installer...
Installation successful.
2021-11-10 08:56:34 adobecreativeclouddesktop Finishing…
2021-11-10 08:56:44 adobecreativeclouddesktop App(s) found: /Library/Application Support/Adobe/Adobe Desktop Common/HDBox/Install.app
2021-11-10 08:56:44 adobecreativeclouddesktop could not determine location of Install.app
2021-11-10 08:56:44 adobecreativeclouddesktop Installed Creative Cloud
2021-11-10 08:56:44 adobecreativeclouddesktop notifying
2021-11-10 08:56:44 adobecreativeclouddesktop Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.0LNrXCQX
2021-11-10 08:56:44 adobecreativeclouddesktop Unmounting /Volumes/Creative Cloud
"disk4" ejected.
2021-11-10 08:56:45 adobecreativeclouddesktop App not closed, so no reopen.
2021-11-10 08:56:45 adobecreativeclouddesktop ################## End Installomator, exit code 0
```
If `INSTALL=force` is used, then previously we would need installed version and appNewVersion to be equal for the updateTool to be skipped. Not anymore.
Separate lines for running `msupdate --list` before running the update tool, but currently it runs if just msupdate exist, and not only if we run the updateTool.
By using variable `archiveName` we can let Installomator find the right archive in the github list of possibilities. I think this is a more cleaner approach.
Added a bit to explanation of archiveName variable.
```
sudo /Users/st/Documents/GitHub/Installomator/utils/assemble.sh -r macports DEBUG=0 INSTALL=force
Password:
2021-11-02 09:55:12 macports setting variable from argument DEBUG=0
2021-11-02 09:55:12 macports setting variable from argument INSTALL=force
2021-11-02 09:55:12 macports ################## Start Installomator v. 0.8.0
2021-11-02 09:55:12 macports ################## macports
2021-11-02 09:55:13 macports BLOCKING_PROCESS_ACTION=tell_user
2021-11-02 09:55:13 macports NOTIFY=success
2021-11-02 09:55:14 macports LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2021-11-02 09:55:14 macports no blocking processes defined, using MacPorts as default
2021-11-02 09:55:14 macports Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4KnOGDkl
2021-11-02 09:55:14 macports Custom App Version detection is used, found 2.7.1
2021-11-02 09:55:14 macports appversion: 2.7.1
2021-11-02 09:55:14 macports Latest version of MacPorts is 2.7.1
2021-11-02 09:55:14 macports There is no newer version available.
2021-11-02 09:55:14 macports Using force to install anyway. Not using updateTool.
2021-11-02 09:55:14 macports Downloading https://github.com/macports/macports-base/releases/download/v2.7.1/MacPorts-2.7.1-12-Monterey.pkg to Monterey.pkg
2021-11-02 09:55:15 macports no more blocking processes, continue with update
2021-11-02 09:55:15 macports Installing MacPorts
2021-11-02 09:55:16 macports Verifying: Monterey.pkg
2021-11-02 09:55:16 macports Team ID: QTA3A3B7F3 (expected: QTA3A3B7F3 )
2021-11-02 09:55:16 macports Installing Monterey.pkg to /
installer: Package name is MacPorts
installer: Upgrading at base path /
installer: The upgrade was successful.
2021-11-02 09:56:03 macports Finishing…
2021-11-02 09:56:13 macports Custom App Version detection is used, found 2.7.1
2021-11-02 09:56:13 macports Installed MacPorts, version 2.7.1
2021-11-02 09:56:13 macports notifying
2021-11-02 09:56:14 macports Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.4KnOGDkl
2021-11-02 09:56:14 macports App not closed, so no reopen.
2021-11-02 09:56:14 macports ################## End Installomator, exit code 0
```
Moved the root user check to the beginning of the script, but added in debug
mode 2 to allow for the kinds of testing you used to be able to do when running
the program in debug 0 as a non-root user. Resolves issue 88
Root user check is now moved from the installation function to main. The new
location is after parsing the label but before printing the log for blocking
process and notify settings. This prevents a downloading an application
that can't be installed.
Resolves issue #88
- 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).
- Added option to not interrupt Do Not Disturb full screen apps like Keynote or Zoom with `INTERRUPT_DND="no"`. Default is `"yes"` which is how it has worked until now.
-`pkgName` in a label can now be searched for. An example is logitechoptions, where only the name of the pkg is given, and not the exact file path to it.
-`LSMinimumSystemVersion` will now be honered, if the `Info.plist` in the app is specifying this. That means that an app that has this parameter in that file and it shows that the app requires a newer version of the OS than is currently installed, then we will not install it.
- New variable `RETURN_LABEL_NAME`. If given the value `1`, like `RETURN_LABEL_NAME=1` then Installomator only returns the name of the label. It makes for a better user friendly message for displaying in DEPNotify if that is integrated.
- Changed logic if `IGNORE_APP_STORE_APPS=yes`. Before this version a label like `microsoftonedrive` that was installed from App Store, and that we want to replace with the “ordinary” version, Installomator would still use `updateTool`, even though `IGNORE_APP_STORE_APPS=yes`. So we would have to have `INSTALL=force` in order to have the app replaced, as `updateTool` would be used. But now if `IGNORE_APP_STORE_APPS=yes` then `updateTool` will be not set, and the App Store app will be replaced. BUT if the installed software was not from App Store, then `updateTool` will not be used, and it would be a kind of a forced install (in the example of `microsoftonedrive`), except if the version is the same (where installation is skipped).
- Added variable `SYSTEMOWNER` that is used when copying files when installing. Default `0` is to change owner of the app to the current user on the Mac, like this user was installing this app themselves. When using `1` we will put “root:wheel” on the app, which can be useful for shared machines.
- Added option `curlOptions` to the labels. It can be filled with extra headers need for downloading the specific software. It needs to be an array, like `curlOptions=( )`. See “mocha”-software-labels.
Big changes to logging:
- Introducing variable `LOGGING`, that can be either of the logging levels
- Logging levels:
0: DEBUG Everything is logged
1: INFO Normal logging behavior
2: WARN
3: ERROR
4: REQ
- External logging to Datadog
- A function to shorten duplicate lines in installation logs or output of longer commands
- Ability to extract install.log in the time when Installomator was running, if further investigations needs to be done to logs
Fixes:
- Fixed a problem with pkgs: If they were mounted with .pkg in the name, then we would find the directory and not the pkg file itself.
- Minor fix for a check for a pkgName on a DMG. We used `ls` that would throw an error when not found, so the check was corrected.
## 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
- default for `BLOCKING_PROCESS_ACTION`is now `BLOCKING_PROCESS_ACTION=tell_user` and not `prompt_user`. It will demand the user to quit the app to get it updated, and not present any option to skip it. In considering various use cases in different MDM solutions this is the best option going forward. Users usually choose to update, and is most often not bothered much with this information. If it's absoultely a bad time, then they can move the dialog box to the side, and click it when ready.
- script is now assembled from fragments. This helps avoid merging conflicts on git and allows the core team to work on the script logic while also accepting new labels. See the "Assemble Script ReadMe" for details.
- We now detect App Store installed apps, and we do not replace them automatically. An example is Slack that will loose all settings if it is suddenly changed from App Store version to the "web" version (they differ in the handling of settings files). If `INSTALL=force` then we will replace the App Store app. We log all this.
- Change in finding installed apps. We now look in /Applications and /Applications/Utilities first. If not found there, we use spotligt to find it. (We discovered a problem when a user has Parallels Windows installed with Microsoft Edge in it. Then Installomator wanted to update the app all the time, becaus spotligt found that Windows version of the app that Parallels created.)
- Change in finding installed apps. We now look in /Applications and /Applications/Utilities first. If not found there, we use spotligt to find it. (We discovered a problem when a user has Parallels Windows installed with Microsoft Edge in it. Then Installomator wanted to update the app all the time, becaus spotlight found that Windows version of the app that Parallels created.)
- Added bunch of new labels, and improved others.
- Renamed `buildCaseStatement.sh` to `buildLabel.sh` and improved it a lot. It is a great start when figuring out how to create a new label for an app, or a piece of software. Look at the tutorials in our wiki.
- Mosyle changed their app name from Business to Self-Service
__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the files below `fragments`-folder. DO NOT edit the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten.__
We try to keep the script as short as possible, and with more than 300 labels, we can save 300 lines in the script, if we do not have credit lines on each of these. So we are thankful for your contribution, but we will be removing these lines in the coming releases.
## Labels
If you need a new label 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 expect you to try out finding the __version__ of the software online, so that `appNewVersion` can be filled in the label. It helps a lot when the software needs update, and greatly improve user experience.
Please document what you found out about the __version__ of the software if it's not included. We will not accept a new label if this is not documented, we will ask about this if it was not included. This is very important for the quality and reliability of Installomator.
When creating a new label, please file a pull request (PR). And feel free to ask questions or make your comments about what else is needed, if we should take a look at the label, or help out in finding the version or isolating URLs or anything else.
Please include the log of installing this label in the description, like this:
Please have one label per PR, so we can separate these. Also if you change/fix a label.
Thank you very much for your contribution!
## Issues
Do not create an issue just when you have a questions, but do file an issue or pull request (PR) for bugs or wrong behavior. Include the full log and include the version of Installomator you're running.
When in doubt, use the MacAdmins.org Slack as described in [README.md](https://github.com/Installomator/Installomator/)
@@ -8,47 +8,69 @@ This script is in the “we find it useful, it is working for us” stage.
Your production and deployment environment will be different, please test thoroughly before rolling it out to your production.
I have put a lot of work into making it stable and safe, but I cannot - of course - make _any_ promises that it won't break in some not yet encountered edge case.
We have put a lot of work into making it stable and safe, but we cannot - of course - make _any_ promises that it won't break in some not yet encountered edge case.
## Authors
Intallomator was original inspired by the download scripts from William Smith and Sander Schram, and created by:
Armin Briegel - @scriptingosx
Later on a few more contributers came on the project:
Isaac Ordonez - @issacatmann
Søren Theilgaard - @Theile
Adam Codega - @acodega
And with numerous contributions from many others.
## 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 [README.md](utils/README.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.
Do not create an issue just when you have a questions, but do file an issue or pull request for bugs or wrong behavior. When in doubt, ask in the above Slack channel.
Do not create an issue just when you have a questions, but do file an issue or pull request (PR) for bugs or wrong behavior. When in doubt, ask in the above Slack channel.
If you have added a new label, then please file a pull request. (and Thank you!)
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.
Please see [CONTRIBUTING.md](https://github.com/Installomator/Installomator/blob/dev/CONTRIBUTING.md) for how to contribute.
## More reading
There are a few interesting post on Installomator on my weblog:
- [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
As a system engineer at [an Apple Authorized Enterprise Reseller](https://prowarehouse.nl), we manage a lot of Jamf instances.
In the world of managing Apple Macs, organizations can have two different approaches to the management. Either the IT department will tightly manage and verify each piece of software, or they will just want the latest software to be deployed as fast as possible.
Some of these instances are tightly managed, i.e. the versions of the operating system and third party software are controlled and updates will only be pushed with the management system when the administration and security team went through an approval process and then the update is automated. This is an important and valid workflow and the right fit for many deployments.
OK, maybe some software should be tightly managed and others not, but you get the point.
### Tightly managed
If your solution needs to be tightly managed, i.e. the versions of the operating system and third party software are controlled and updates will only be pushed with the management system when the administration and security team went through an approval process and then the update is automated. This is an important and valid workflow and the right fit for many deployments.
Installomator was _not_ written for these kinds of deployment.
If you are running this kind of deployment, you want to use [AutoPkg](https://github.com/autopkg/autopkg) and you can stop reading here.
There are other kinds of deployments, though. In these deployments the management system is merely used to "get the user ready" as quickly as possible when they set up a new machine, and to offer software from a self service portal. In these deployments, system and software installations are 'latest version available' and updates are user driven (though we do want to nag them).
### Latest version always
These deployments are
There are other kinds of deployments, though. In these deployments the management system is merely used to “get the user ready” as quickly as possible when they set up a new machine, and to offer software from a self service portal. In these deployments, system and software installations are ‘latest version available’ and updates are user driven (though we do want to nag them and push them).
Installomator can help with this.
These deployments can be
- user driven
- low control
- minimal maintenance effort
- latest version is best
These are mostly 'user controlled' Macs and we (the admins) just want to assist the user in doing the right thing. And the right thing is (often) to install the latest versions and updates when they are available.
These can be 'user controlled' Macs and we (the admins) just want to assist the user in doing the right thing. And the right thing is (often) to install the latest versions and updates when they are available.
The Mac App Store and software pushed through the Mac App Store follow this approach. When you manage and deploy software through the App Store — whether it is on iOS or macOS — neither the MacAdmin nor the user get a choice of the application version. They will get the latest version.
@@ -65,16 +87,25 @@ Some of these disadvantages can be seen as advantages in different setups. When
Because this is an attractive solution for _certain kinds_ of deployment, there are already many scripts out there that will download and install the latest version of a given software. And we have built and used quite a few in-house, as well. Most importantly, [William Smith has this script](https://gist.github.com/talkingmoose/a16ca849416ce5ce89316bacd75fc91a) which can be used to install several different Microsoft applications and bundles, because Microsoft has a nice unified URL scheme.
At some point, earlier this year, I got frustrated at the number of scripts we were maintaining (or failing to). Also, my concern that most of the scripts weren't doing _any_ verification of the download was getting unbearable. So, I set out to write the one install script to rule them all...
At some point, in 2018, Armin got frustrated at the number of scripts he was maintaining (or failing to). Also, his concern that most of the scripts weren’t doing _any_ verification of the download was getting unbearable. So, he set out to write _the one install script to rule them all…_
### Locally installed
So Armin made the version for Jamf Pro but universally for any MDM to adopt.
Søren looked at this, and wanted this approach to work in Mosyle and Addigy, and for these solutions we need Installomator to be locally installed on. the Mac, and then the MDM can call this script from their scripts features. For some time Søren had a version of Installomator that was supplied with a notarized pkg, so it could be deployed as part of DEP or however was needed.
This has now been merged into Installomator, and with contributions of Isaac and Adam, new features and labels have been added more frequently.
## Goals
My goals for Installomator are:
The goals for Installomator are:
- work with various common archive types
- verify the downloaded archive or application
- have a simple 'interface' to the admin
- single script file so it can 'easily' be copied into a management system
- have a simple ‘interface’ to the admin
- single script file so it can ‘easily’ be copied into a management system
- signed and notarized pkg-installer for local installation
- extensible without deep scripting knowledge
- work independently of a specific management system
- no dependencies that may be removed from macOS in the future or are not pre-installed
@@ -91,9 +122,9 @@ Installomator can work with the following common archive and installer types:
When the download yields a pkg file, Installomator will run `installer` to install it on the current system.
Applications in dmgs or zips will be copied to `/Applications` and their owner will be set to the current user, so the install works like a standard drag'n drop installation.
Applications in dmgs or zips will be copied to `/Applications` and their owner will be set to the current user, so the install works like a standard drag'n drop installation. Owner can also be set to root/wheel.
(I consider it a disgrace, that Jamf, after nearly 20 years, _still_ cannot deal with 'drag'n drop installation dmgs' natively. It's not _that_ hard.)
(I consider it a disgrace, that Jamf, after nearly 20 years, _still_ cannot deal with ‘drag’n drop installation dmgs natively. It’s not _that_ hard.)
### Verify the download
@@ -110,11 +141,11 @@ When used to install software, Installomator has a single argument: the label or
There is a debug mode and one other setting that can be controlled with variables in the code. This simplifies the actual use of the script from within a management system.
There is a debug mode and other settings that can be controlled with variables in the code. This simplifies the actual use of the script from within a management system.
### 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`):
When you know how to extract these pieces of information from the application and/or download, then you can add an application to Installomator.
The script `buildCaseStatement.sh` can help with the label creation.
The script `buildLabel.sh` can help with the label creation. Just server the URL to the script, and it will try to figure out things and write out a label as output. See [Wiki Tutorials](https://github.com/Installomator/Installomator/wiki#tutorials).
Please note: Labels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed.
Actually labels are part of a case-statement, and must be formatted accordingly.
### Not specific to a management system
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.
Armin wrote this script mainly for use with Jamf Pro, because that is what he used. For testing, you can run the script interactively from the command line. However, we 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
The script started out as a pure `sh` script, and when I needed arrays I 'switched' to `zsh`, because that is what [we can rely on being in macOS for the foreseeable future](https://scriptingosx.com/zsh). There are quite a few places where using python would have been easier and safer, but with the python 2 run-time being deprecated, that would have added a requirement for a Python 3 run-time to be installed. XML and JSON parsing would have been better with a tool like [scout](https://github.com/ABridoux/scout) or [jq](https://stedolan.github.io/jq/), but those would again require additional installations on the client before the script can run.
The script started out as a pure `sh` script, and when arrays was needed it was ‘switched’ to `zsh`, because that is what [we can rely on being in macOS for the foreseeable future](https://scriptingosx.com/zsh). There are quite a few places where using python would have been easier and safer, but with the python 2 run-time being deprecated, that would have added a requirement for a Python 3 run-time to be installed. XML and JSON parsing would have been better with a tool like [scout](https://github.com/ABridoux/scout) or [jq](https://stedolan.github.io/jq/), but those would again require additional installations on the client before the script can run.
Keeping the script as a `zsh` allows you to paste it into your management system's interface (and disable the DEBUG mode) and use it without requiring any other installations.
@@ -180,19 +213,19 @@ Other than the version arguments, the argument can be any of the labels listed i
### Debug mode
There is a variable named `DEBUG` which is set in line 21 of the script. When `DEBUG` is set to `1` (default) no actions that would actually modify the current system are taken. This is useful for testing most of the actions in the script, but obviously not all of them.
There is a variable named `DEBUG` which is set in line 21 of the script. When `DEBUG` is set to `1` (default) or `2` for a variation of debug, no actions that would actually modify the current system are taken. This is useful for testing most of the actions in the script, but obviously not all of them.
Also when the `DEBUG` variable is `1`, downloaded archives and extracted files will be written to the script's directory, rather than a temporary directory, which can make debugging easier.
When the `DEBUG` variable is `1`, downloaded archives and extracted files will be written to the script's directory, rather than a temporary directory, which can make debugging easier.
_Always remember_ to change the `DEBUG` variable to `0` when deploying.
When `DEBUG` variable is `2`, the temporary folder is created and downloaded and extracted files goes to that folder, as if not in DEBUG mode, but installation is still not done. On the other hand blocking processes are checked, the app is reopened if closed, and the user is notified.
### Use Installomator with Jamf Pro
Debug mode 1 is useful to test the download and verification process without having to re-download and re-install an application or package on your system. Debug mode 2 is great for checking running processe and notifications.
In Jamf Pro, create a new 'Script' and paste the contents of `Installomator.sh` into the 'Script Contents' area. Under 'Options' you can change the parameter label for argument 4 to 'Application Label.'
_Always remember_ to change the `DEBUG` variable to `0` when deploying. The installer PKG we provide has `DEBUG=0`.
Remember to set `DEBUG` to `0`.
### Use Installomator with various MDM solutions
Then you can use the Installomator script in a policy and choose the application to install by setting the label for argument 4.
In the wiki we have provided documentation on how Installomator is used in various MDM solution, like [Jamf Pro](https://github.com/Installomator/Installomator/wiki/MDM:-Jamf-Pro), [Mosyle](https://github.com/Installomator/Installomator/wiki/MDM:-Mosyle-(Business,-Fuse,-and-Manager)), and [Addigy](https://github.com/Installomator/Installomator/wiki/MDM:-Addigy).
## What it does
@@ -200,7 +233,7 @@ When it runs with a known label, the script will perform the following:
- Check the version installed with the version online. Only continue if it's different
- download the latest version from the vendor
- when the application is running, prompt the user to quit or cancel
- when the application is running, prompt the user to quit or cancel (customizable)
- dmg or zip archives:
- extract the application and copy it to /Applications
- change the owner of the application to the current user
@@ -208,19 +241,11 @@ When it runs with a known label, the script will perform the following:
- when necessary, extract the pkg from the enclosing archive
- install the pkg with the `installer` tool
- clean up the downloaded files
- notify the user
- notify the user (also customizable)
## Configuring the script
As of now there are two settings that are meant to configured when deploying the script.
### Debug mode
The first is the `DEBUG` variable. When this is set to `1` the script will _not_ perform any changes to the current system. In other words, no application will be copied to the target directory and no `installer` command be performed.
In addition, files will be downloaded and extracted to the Installomator project folder instead of a temporary directory and _not_ deleted when the script exits. Also archives will _not_ be re-downloaded when they already exist in the project folder. The repository's `.gitignore` file is set up to ignore the archive file extensions.
Debug mode is useful to test the download and verification process without having to re-download and re-install an application or package on your system.
We have several default settings for certain behavior and notifications inside the script, but these can be customized when calling the script.
### Blocking Process actions
@@ -229,13 +254,13 @@ The `BLOCKING_PROCESS_ACTION` variable controls the behavior of the script when
There are eight options:
-`ignore`: continue even when blocking processes are found.
-`silent_fail`: exit script without prompt or installation.
-`prompt_user`: (default) 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.
-`silent_fail`: Exit script without prompt or installation.
-`prompt_user`: Show a user dialog for each blocking process found, user can choose "Quit and Update" or "Not Now". When "Quit and Update" is chosen, blocking process will be told to quit. Installomator will wait 30 seconds before checking again in case Save dialogs etc are being responded to. Installomator will abort if quitting after three tries does not succeed. "Not Now" will exit Installomator.
-`prompt_user_then_kill`: show a user dialog for each blocking process found, user can choose "Quit and Update" or "Not Now". When "Quit and Update" is chosen, blocking process will be terminated. Installomator will abort if terminating after two tries does not succeed. "Not Now" will exit Installomator.
-`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.
WARNING! It might block the MDM agent on the machine, as the script will not exit, it will pause until the hour has passed, possibly blocking for other management actions in this time.
-`tell_user`: (Default) 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. This is default.
-`tell_user_then_kill`: User will be showed a notification about the important update, but user is only allowed to Quit and Continue. If the quitting fails, the blocking processes will be terminated.
-`kill`: kill process without prompting or giving the user a chance to save.
If any process was closed, Installomator will try to open the app again, after the update process is done.
@@ -265,11 +290,17 @@ __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.
### Owner of copied apps
Default is `SYSTEMOWNER=0`
__options:__
-`0`: Current user will be owner of copied apps, just like if they installed it themselves (default).
-`1`: root:wheel will be set on the copied app. Useful for shared machines.
### Install behavior (force 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
### Re-opening of closed app
@@ -279,9 +310,29 @@ The `REOPEN` can be used to prevent the reopening of a closed app
-`yes`: (default) app will be reopened if it was closed
-`no`: app not reopened
### Adding applications/label blocks
### Configuration from Arguments
#### Required Variables
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
Providing variables this way will override any variables set in the script.
You can even provide _all_ the variables necessary for download and installation. Of course, without a label the argument parsing will fail, so I created a special label `valuesfromarguments` which only checks if the four required values are present:
The order of the variables and label is not relevant. But, when you provide more than one label, all but the _last_ label will be ignored.
Providing all the variables this way might be useful for certain downloads that have a customized URL for each vendor/customer (like customized TeamView or Watchman Monitoring) or are local downloads.
## Adding applications/label blocks
### Required Variables
The script requires four pieces of information to download and install an application:
@@ -314,6 +365,12 @@ The URL from which to download the archive.
The URL can be generated by a series of commands, for example when you need to parse an xml file for the latest URL. (See `bbedit`, `desktoppr`, or `omnigraffle` for examples.)
Sometimes version differs between Intel and Apple Silicon versions. (See `brave`, `obsidian`, `omnidisksweeper`, or `notion`).
-`curlOptions`: (array, optional)
Options to the `curl` command, needed for `curl` to be able to download the software.
Usually used for adding extra headers that some servers need in order to serve the file.
`curlOptions=( -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" )`
(See “mocha”-labels, for examples on labels, and `buildLabel.sh` for header-examples.)
-`appNewVersion` (optional, but recommended):
Version of the downloaded software.
If given, it will be compared to installed version, to see if download is different.
@@ -334,8 +391,7 @@ The 10-character Developer Team ID with which the application or pkg is signed a
- Installation Packages (pkg)
`spctl -a -vv -t install ~/Downloads/desktoppr-0.2.pkg`
#### Optional Variables
### Optional Variables
Depending on the application or pkg there are a few more variables you can or need to set. Many of these are derived from the required variables, but may need to be set manually if those derived values do not work.
@@ -374,47 +430,35 @@ Depending on the application or pkg there are a few more variables you can or ne
`$updateTool $updateArguments`
Will be run instead of of downloading and installing a complete new version.
Use this when the `updateTool` does differential and optimized downloads.
e.g. `msupdate` (see microsoft installations)
e.g. `msupdate` (see various Microsoft installations).
-`updateToolRunAsCurrentUser`:
When this variable is set (any value), `$updateTool` will be run as the current user. Default is unset and
### Configuration from Arguments
You can provide a configuration variable, such as `DEBUG` or `NOTIFY` as an argument in the form `VAR=value`. For example:
Providing variables this way will override any variables set in the script.
You can even provide _all_ the variables necessary for download and installation. Of course, without a label the argument parsing will fail, so I created a special label `valuesfromarguments` which only checks if the four required values are present:
The order of the variables and label is not relevant. But, when you provide more than one label, all but the _last_ label will be ignored.
Providing all the variables this way might be useful for certain downloads that have a customized URL for each vendor/customer (like customized TeamView or Watchman Monitoring) or are local downloads.
-`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
## Frequently Asked Questions
### What if the latest version of the app is already installed?
Short answer: Installomator will re-download and re-install the latest over the existing installation.
Short answer: That depends on if labels will know what the latest version will be.
Longer answer:
Installomator will try to find a currently installed app to log the version. When Installomator finds an existing app (any version) and the `updateTool` variable is set, then Installomator will _not_ download and install, but run the `updateTool` instead.
However, there is no simple generic method to actually determine the latest version of an application or installer.
We deploy Installomator usually for user initiated installations from Self Service, so re-installs don't really 'hurt' and may be a useful troubleshooting step.
When you want to have automated installations, you can use smart groups based on the app version to limit excessive re-installations.
- Labels without this will re-download and re-install the latest over the existing installation.
- Labels with this info will only install the app if the version is different than the one installed.
- Labels that can use update tool will use that for the update (if the version is different)
### Why don't you just use `autopkg install`?
@@ -444,7 +488,7 @@ Please don't misunderstand this as me saying that AutoPkg is a bad or poorly des
But it is not suited as a client install automation tool.
### Why don't you just use brew?
### Why don't you just use brew or MacPorts?
Read the explanation for `autopkg`, pretty much the same applies for `brew`, i.e. while it is useful on a single Mac, it is a un-manageable mess when you think about deploying and managing on a fleet of computers.
if ! is-at-least 10.14 $(sw_vers -productVersion);then
installedOSversion=$(sw_vers -productVersion)
if ! is-at-least 10.14 $installedOSversion;then
printlog "Installomator requires at least macOS 10.14 Mojave."
exit98
fi
@@ -36,24 +37,70 @@ done
# lowercase the label
label=${label:l}
printlog "################## Start Installomator v. $VERSION"
printlog "################## $label"
# separate check for 'version' in order to print plain version number without any other information
if[[$label=="version"]];then
echo"$VERSION"
exit0
fi
# MARK: Logging
log_location="/private/var/log/Installomator.log"
# Check if we're in debug mode, if so then set logging to DEBUG, otherwise default to INFO
# if no log level is specified.
if[[$DEBUG -ne 0]];then
LOGGING=DEBUG
elif[[ -z $LOGGING]];then
LOGGING=INFO
datadogLoggingLevel=INFO
fi
# Associate logging levels with a numerical value so that we are able to identify what
# should be removed. For example if the LOGGING=ERROR only printlog statements with the
# level REQ and ERROR will be displayed. LOGGING=DEBUG will show all printlog statements.
# If a printlog statement has no level set it's automatically assigned INFO.
declare -A levels=(DEBUG 0 INFO 1 WARN 2 ERROR 3 REQ 4)
# If we are able to detect an MDM URL (Jamf Pro) or another identifier for a customer/instance we grab it here, this is useful if we're centrally logging multiple MDM instances.
printlog "Installed $appName is from App Store, use “IGNORE_APP_STORE_APPS=yes” to replace."
@@ -180,7 +251,7 @@ getAppVersion() {
printlog "Replacing App Store apps, no matter the version"
appversion=0
else
cleanupAndExit 1"App previously installed from App Store, and we respect that"
cleanupAndExit 1"App previously installed from App Store, and we respect that" ERROR
fi
fi
else
@@ -192,9 +263,9 @@ getAppVersion() {
}
checkRunningProcesses(){
# don't check in DEBUG mode
if[[$DEBUG -ne 0]];then
printlog "DEBUG mode, not checking for blocking processes"
# don't check in DEBUG mode 1
if[[$DEBUG -eq1]];then
printlog "DEBUG mode 1, not checking for blocking processes" DEBUG
return
fi
@@ -205,7 +276,7 @@ checkRunningProcesses() {
if pgrep -xq "$x";then
printlog "found blocking process $x"
appClosed=1
case$BLOCKING_PROCESS_ACTION in
quit|quit_kill)
printlog "telling app $x to quit"
@@ -227,7 +298,7 @@ checkRunningProcesses() {
prompt_user|prompt_user_then_kill)
button=$(displaydialog "Quit “$x” to continue updating? (Leave this dialogue if you want to activate this update later).""The application “$x” needs to be updated.")
# while debugging, items will be downloaded to the parent directory of this script
# also no actual installation will be performed
# debug mode 1 will download to the directory the script is run in, but will not check the version
# debug mode 2 will download to the temp directory, check for blocking processes, check the version, but will not install anything or remove the current version
DEBUG=1
# notify behavior
@@ -37,29 +39,36 @@ NOTIFY=success
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 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
# 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 show a user dialog for each blocking process found,
# user can choose "Quit and Update" or "Not Now".
# When "Quit and Update" is chosen, blocking process
# will be told to quit. Installomator will wait 30 seconds
# before checking again in case Save dialogs etc are being responded to.
# Installomator will abort if quitting after three tries does not succeed.
# "Not Now" will exit Installomator.
# - prompt_user_then_kill
# show a user dialog for each blocking process found,
# attempt to quit two times, kill the process finally
# user can choose "Quit and Update" or "Not Now".
# When "Quit and Update" is chosen, blocking process
# will be terminated. Installomator will abort if terminating
# after two tries does not succeed. "Not Now" will exit Installomator.
# - 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,
# the script will not exit, it will pause 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.
# but user is only allowed to Quit and Continue, and then we
# ask the app to quit. This is default.
# - tell_user_then_kill
# Show dialog 2 times, and if the quitting fails, the
# blocking processes will be killed.
# User will be showed a notification about the important update,
# but user is only allowed to Quit and Continue. If the quitting fails,
# the blocking processes will be terminated.
# - kill kill process without prompting or giving the user a chance to save
@@ -79,18 +88,25 @@ LOGO=appstore
# 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
# - no If the installed app is from App Store (which include VPP installed apps)
# it will not be touched, no matter its version (default)
# - yes Replace App Store (and VPP) version of the 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.
# Known bad example: Slack will lose all settings.
# Owner of copied apps
SYSTEMOWNER=0
# options:
# - 0 Current user will be owner of copied apps, just like if they
# installed it themselves (default).
# - 1 root:wheel will be set on the copied app.
# Useful for shared machines.
# install behavior
INSTALL=""
# options:
# - When not set, software will only be installed
# - When not set, the software will only be installed
# if it is newer/different in version
# - force Install even if it’s the same version
@@ -98,9 +114,29 @@ INSTALL=""
# Re-opening of closed app
REOPEN="yes"
# options:
# - yes App wil be reopened if it was closed
# - yes App will be reopened if it was closed
# - no App not reopened
# Only let Installomator return the name of the label
# RETURN_LABEL_NAME=0
# options:
# - 1 Installomator will return the name of the label and exit, so last line of
# output will be that name. When Installomator is locally installed and we
# use DEPNotify, then DEPNotify can present a more nice name to the user,
# instead of just the label name.
# Interrupt Do Not Disturb (DND) full screen apps
INTERRUPT_DND="yes"
# options:
# - yes Script will run without checking for DND full screen apps.
# - no Script will exit when an active DND full screen app is detected.
# Comma separated list of app names to ignore when evaluating DND
IGNORE_DND_APPS=""
# example that will ignore browsers when evaluating DND:
# If given, will be used to find version of installed software, instead of searching for an app.
# If given, will be used to find the version of installed software, instead of searching for an app.
# Usefull if a pkg does not install an app.
# See label installomator_st
#
@@ -132,9 +168,15 @@ REOPEN="yes"
# URL to download the dmg.
# Can be generated with a series of commands (see BBEdit for an example).
#
# - curlOptions: (array, optional)
# Options to the curl command, needed for curl to be able to download the software.
# Usually used for adding extra headers that some servers need in order to serve the file.
# curlOptions=( -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" )
# (See “mocha”-labels, for examples on labels, and buildLabel.sh for header-examples.)
#
# - appNewVersion: (optional)
# Version of the downloaded software.
# If given, it will be compared to installed version, to see if download is different.
# If given, it will be compared to the installed version, to see if the download is different.
# It does not check for newer or not, only different.
#
# - versionKey: (optional)
@@ -164,6 +206,8 @@ REOPEN="yes"
# - archiveName: (optional)
# The name of the downloaded file.
# When not given the archiveName is derived from the $name.
# Note: This has to be defined BEFORE calling downloadURLFromGit or
# versionFromGit functions in the label.
#
# - appName: (optional)
# File name of the app bundle in the dmg to verify and copy (include .app).
@@ -186,7 +230,7 @@ REOPEN="yes"
# blockingProcesses=( NONE )
#
# - pkgName: (optional, only used for pkgInDmg, dmgInZip, and appInDmgInZip)
# File name of the pkg/dmg file _inside_ the dmg or zip
# File name or path to the pkg/dmg file _inside_ the dmg or zip.
# When not given the pkgName is derived from the $name
#
# - updateTool:
@@ -196,8 +240,64 @@ REOPEN="yes"
# $updateTool $updateArguments
# Will be run instead of of downloading and installing a complete new version.
# Use this when the updateTool does differential and optimized downloads.
# e.g. msupdate
# e.g. msupdate on various Microsoft labels
#
# - updateToolRunAsCurrentUser:
# When this variable is set (any value), $updateTool will be run as the current user.
#
# - CLIInstaller:
# - CLIArguments:
# If the downloaded dmg is 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 than `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
#
### Logging
# Logging behavior
LOGGING="INFO"
# options:
# - DEBUG Everything is logged
# - INFO (default) normal logging level
# - WARN only warning
# - ERROR only errors
# - REQ ????
# MDM profile name
MDMProfileName=""
# options:
# - MDM Profile Addigy has this name on the profile
# - Mosyle Corporation MDM Mosyle uses this name on the profile
# From the LOGO variable we can know if Addigy og Mosyle is used, so if that variable
# is either of these, and this variable is empty, then we will auto detect this.
# Datadog logging used
datadogAPI=""
# Simply add your own API key for this in order to have logs sent to Datadog
# See more here: https://www.datadoghq.com/product/log-management/
# Log Date format used when parsing logs for debugging, this is the default used by
# install.log, override this in the case statements if you need something custom per
# application (See adobeillustrator). Using stadard GNU Date formatting.
LogDateFormat="%Y-%m-%d %H:%M:%S"
# Get the start time for parsing install.log if we fail.
appNewVersion=$( curl -fs 'https://daisydiskapp.com/downloads/appcastReleaseNotes.php?appEdition=Standard'| grep Version | head -1 | sed -E 's/.*Version ([0-9.]*).*/\1/g')
#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)"
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.