Commit Graph

33 Commits

Author SHA1 Message Date
Søren Theilgaard
b42bd7e408 Trapping the script
Using these signals:
```
SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM SIGTSTP
```

Fixed #272
2022-02-08 13:11:08 +01:00
Søren Theilgaard
ae3f711738 Further logging, finding pkg only return files
Important change, when we use `find` to locate pkgs. Now only files will be returned.
2022-02-07 16:32:23 +01:00
Søren Theilgaard
0a05b533a5 Logging info and a fix 2022-02-02 19:59:14 +01:00
Søren Theilgaard
d36b42acf4 Isaac logging improvements/fixes
Moved the variable declarations from `functions.sh` to `arguments.sh`. We need the argument parsing before setting the logging level and other variables.
2022-02-02 19:39:48 +01:00
Søren Theilgaard
952683310a Merge branch 'pr/268' into 2022-02-02_Theile-base 2022-02-02 14:46:47 +01:00
Søren Theilgaard
5b54eb7674 Merge branch 'Improved-Isaac-logging' into 2022-02-02_Theile-base 2022-02-02 14:38:18 +01:00
Søren Theilgaard
0f448404e2 Merge branch 'dev' into fullscreen-check 2022-01-17 09:53:11 +01:00
Søren Theilgaard
f96cd178c6 CLIInstaller included
and a few other displaylog lines changed
2022-01-13 09:44:34 +01:00
Søren Theilgaard
99b908f646 Logging 2022-01-12 21:34:16 +01:00
Søren Theilgaard
1360b51eae removed the debug set -x 2022-01-11 16:35:09 +01:00
Søren Theilgaard
bd07ee6c76 More to curlOptions 2022-01-11 12:53:06 +01:00
Søren Theilgaard
01eabca204 Introducing curlOptions to labels. 2022-01-11 11:54:54 +01:00
Søren Theilgaard
732181c3a6 Delete main.sh 2022-01-11 11:42:29 +01:00
Søren Theilgaard
a8c9fdbab7 Download with extra sets of headers 2022-01-10 20:26:53 +01:00
Søren Theilgaard
fe4c8a96da brave fix 2022-01-10 13:04:04 +01:00
Søren Theilgaard
cd1d05b21f Merge branch 'dev' into Return-label-name 2022-01-09 21:23:24 +01:00
Søren Theilgaard
3b6e27f1fa RETURN_LABEL_NAME implemented
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)
2022-01-07 09:51:27 +01:00
Søren Theilgaard
2ba53683df Update main.sh
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
```
2021-11-30 10:25:28 +01:00
Søren Theilgaard
dda03ae9d5 Merge branch 'dev' into fullscreen-check 2021-11-25 12:51:42 +01:00
Søren Theilgaard
52f1371042 Merge branch 'dev' into dev 2021-11-25 09:40:38 +01:00
Søren Theilgaard
2a15a2142d Moved root check to before case statement
We can have code in the case statement, so no need to run that, if we were supposed to exit.
2021-11-23 08:59:44 +01:00
Søren Theilgaard
6b7c01dbaa Merge branch 'dev' into microsoft-labels-updates 2021-11-22 09:58:33 +01:00
Søren Theilgaard
28d2f78465 Merge branch 'dev' into Update/install-detection 2021-11-22 09:34:01 +01:00
Søren Theilgaard
891dab08d4 installerTool implemented 2021-11-15 14:25:57 +01:00
Søren Theilgaard
800c356b01 updae/installation detection 2021-11-10 15:29:59 +01:00
Søren Theilgaard
1931973b54 Fixed INSTALL=force no matter the version
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.
2021-11-05 21:30:26 +01:00
Sam Ess
d402f46c3c Fixed printlog issue 2021-10-16 19:17:06 -04:00
Sam Ess
c85a7a1fba Add in missing fi
Close check for root loop -_-
2021-10-16 19:03:29 -04:00
Sam Ess
b6bc0b1269 Add debug mode 2
Restores functionality of running script as a non-root user for testing purposes.
Resolves issue #88
2021-10-16 18:46:36 -04:00
Sam Ess
cbb1e08e26 Move root user check forward
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
2021-10-16 16:42:56 -04:00
Raptor399
9e2fa65670 Added option to not interrupt Do Not Disturb full screen apps like KeyNote or Zoom 2021-10-12 12:14:29 +02:00
Armin Briegel
97e8c160d2 updated fragements 2021-08-16 16:16:36 +02:00
Armin Briegel
bc9bc74cf9 changed fragments to .sh extension 2021-04-28 09:36:16 +02:00