After manually moving Firefox to Utilities I have tested with this:
```
$ sudo /Installomator/utils/assemble.sh firefox DEBUG=0 INSTALL=force
2022-02-09 09:44:04 : INFO : firefox : setting variable from argument DEBUG=0
2022-02-09 09:44:04 : INFO : firefox : setting variable from argument INSTALL=force
2022-02-09 09:44:04 : REQ : firefox : ################## Start Installomator v. 9.1beta, date 2022-02-09
2022-02-09 09:44:04 : INFO : firefox : ################## Version: 9.1beta
2022-02-09 09:44:04 : INFO : firefox : ################## Date: 2022-02-09
2022-02-09 09:44:04 : INFO : firefox : ################## firefox
2022-02-09 09:44:04 : INFO : firefox : BLOCKING_PROCESS_ACTION=tell_user
2022-02-09 09:44:04 : INFO : firefox : NOTIFY=success
2022-02-09 09:44:04 : INFO : firefox : LOGGING=INFO
2022-02-09 09:44:04 : INFO : firefox : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-02-09 09:44:04 : INFO : firefox : Label type: dmg
2022-02-09 09:44:04 : INFO : firefox : targetDir for installation: /Applications/Utilities
2022-02-09 09:44:04 : INFO : firefox : found app at /Applications/Utilities/Firefox.app, version 97.0, on versionKey CFBundleShortVersionString
2022-02-09 09:44:04 : INFO : firefox : appversion: 97.0
2022-02-09 09:44:04 : INFO : firefox : Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool.
2022-02-09 09:44:04 : INFO : firefox : Latest version of Firefox is 97.0
2022-02-09 09:44:04 : INFO : firefox : There is no newer version available.
2022-02-09 09:44:04 : REQ : firefox : Downloading https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US to Firefox.dmg
2022-02-09 09:44:16 : REQ : firefox : no more blocking processes, continue with update
2022-02-09 09:44:16 : REQ : firefox : Installing Firefox
2022-02-09 09:44:16 : INFO : firefox : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.NMItuUfS/Firefox.dmg
2022-02-09 09:44:24 : INFO : firefox : Mounted: /Volumes/Firefox
2022-02-09 09:44:24 : INFO : firefox : Verifying: /Volumes/Firefox/Firefox.app
2022-02-09 09:44:33 : INFO : firefox : Team ID matching: 43AQ936H96 (expected: 43AQ936H96 )
2022-02-09 09:44:33 : INFO : firefox : Downloaded version of Firefox is 97.0 on versionKey CFBundleShortVersionString, same as installed.
2022-02-09 09:44:33 : INFO : firefox : Using force to install anyway.
2022-02-09 09:44:33 : INFO : firefox : App has LSMinimumSystemVersion: 10.12.0
2022-02-09 09:44:33 : INFO : firefox : Copy /Volumes/Firefox/Firefox.app to /Applications/Utilities
2022-02-09 09:44:40 : INFO : firefox : Changing owner to st
2022-02-09 09:44:40 : INFO : firefox : Finishing...
2022-02-09 09:44:50 : INFO : firefox : targetDir for installation: /Applications/Utilities
2022-02-09 09:44:50 : INFO : firefox : found app at /Applications/Utilities/Firefox.app, version 97.0, on versionKey CFBundleShortVersionString
2022-02-09 09:44:50 : INFO : firefox : Installed Firefox, version 97.0
2022-02-09 09:44:50 : INFO : firefox : notifying
2022-02-09 09:44:50 : REQ : firefox : ################## End Installomator, exit code 0
```
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).
Moved the variable declarations from `functions.sh` to `arguments.sh`. We need the argument parsing before setting the logging level and other variables.
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.
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.
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