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
```