From 2ba53683df686561ab22585d0aa0b700c3c623c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Tue, 30 Nov 2021 10:25:28 +0100 Subject: [PATCH 01/23] Update main.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ``` --- fragments/main.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fragments/main.sh b/fragments/main.sh index 493e2f7..841753a 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -116,9 +116,8 @@ getAppVersion printlog "appversion: $appversion" # MARK: Exit if new version is the same as installed version (appNewVersion specified) -# credit: Søren Theilgaard (@theilgaard) -if [[ $INSTALL == "force" ]]; then - printlog "Using force to install, so not using updateTool." +if [[ "$type" != "updateronly" && ($INSTALL == "force" || $IGNORE_APP_STORE_APPS == "yes") ]]; then + printlog "Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool." updateTool="" fi if [[ -n $appNewVersion ]]; then From 886ab1238a70c40d778548b2229b0b5d3e5cb281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Wed, 1 Dec 2021 21:36:30 +0100 Subject: [PATCH 02/23] SYSTEMOWNER --- fragments/functions.sh | 5 +++-- fragments/header.sh | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index f5d5137..4ae4518 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -392,11 +392,12 @@ installAppWithPath() { # $1: path to app to install in $targetDir fi # set ownership to current user - if [ "$currentUser" != "loginwindow" ]; then + if [[ "$currentUser" != "loginwindow" && $SYSTEMOWNER -ne 1 ]]; then printlog "Changing owner to $currentUser" chown -R "$currentUser" "$targetDir/$appName" else - printlog "No user logged in, not changing user" + printlog "No user logged in or SYSTEMOWNER=1, setting owner to root:wheel" + chown -R root:wheel "$targetDir/$appName" fi elif [[ ! -z $CLIInstaller ]]; then diff --git a/fragments/header.sh b/fragments/header.sh index c41879d..7107a10 100644 --- a/fragments/header.sh +++ b/fragments/header.sh @@ -88,6 +88,13 @@ IGNORE_APP_STORE_APPS=no # Shouldn’t give any problems for the user in most cases. # Known bad example: Slack will loose 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="" From 76ca386abcaf97627f650345b7355f3bf5f948a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Thu, 2 Dec 2021 08:59:43 +0100 Subject: [PATCH 03/23] README --- CHANGELOG.md | 1 + README.md | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f87508..e286cf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## v9? - We have moved the root check to the beginning of the script, and improved DEBUG handling with two different modes. `DEBUG=0` is still for production, and `1` is still for the DEBUG we previously knew downloading to the directory it is running from, but `2` will download to temporary folder, will detect updates, but will not install anything, but it will notify the user (almost as running the script without root before). +- 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. ## v8.0 diff --git a/README.md b/README.md index aef13c3..51e22c2 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,12 @@ __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: From f7846c71d2c8323bdbd6ed6cdc5ba1008786ff39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=BChler?= <48823479+adibue@users.noreply.github.com> Date: Wed, 8 Dec 2021 14:59:15 +0100 Subject: [PATCH 04/23] Added label for 'tidal' Added 'tidal' to fragment labels. Unfortunately, I was not able to find a matching URL for `appNewVersion`... --- fragments/labels/tidal.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 fragments/labels/tidal.sh diff --git a/fragments/labels/tidal.sh b/fragments/labels/tidal.sh new file mode 100644 index 0000000..30690f8 --- /dev/null +++ b/fragments/labels/tidal.sh @@ -0,0 +1,6 @@ +tidal) + name="TIDAL" + type="dmg" + downloadURL="https://download.tidal.com/desktop/TIDAL.dmg" + expectedTeamID="GK2243L7KB" + ;; From f57d946410ccdd68374c9873d904110356fdbe93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=BChler?= <48823479+adibue@users.noreply.github.com> Date: Wed, 8 Dec 2021 15:00:40 +0100 Subject: [PATCH 05/23] Added 'tidal' to 'Labels.txt' --- Labels.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Labels.txt b/Labels.txt index e873028..20c2d91 100644 --- a/Labels.txt +++ b/Labels.txt @@ -328,6 +328,7 @@ textmate theunarchiver things thunderbird +tidal toggltrack tom4aconverter torbrowser From acb785bb296f54c52b8f639d70247cccf066ea11 Mon Sep 17 00:00:00 2001 From: dvreijen <48281354+dvreijen@users.noreply.github.com> Date: Tue, 14 Dec 2021 13:30:15 +0100 Subject: [PATCH 06/23] Create itsycal.sh New label for Itsycal --- fragments/labels/itsycal.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 fragments/labels/itsycal.sh diff --git a/fragments/labels/itsycal.sh b/fragments/labels/itsycal.sh new file mode 100644 index 0000000..073a7c9 --- /dev/null +++ b/fragments/labels/itsycal.sh @@ -0,0 +1,8 @@ +itsycal) + name="Itsycal" + type="zip" + downloadURL="https://itsycal.s3.amazonaws.com/Itsycal.zip" + appNewVersion=$( curl -fsL https://www.mowglii.com/itsycal/versionhistory.html |grep -m1 'id="0' |awk -F '"' '{print $2}' ) + blockingProcesses=( "Itsycal" ) + expectedTeamID="HFT3T55WND" + ;; From 77bee0a88e748eadc1b0e05d084a113131a04679 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 20 Dec 2021 14:29:31 +0100 Subject: [PATCH 07/23] updated teamID for apple fonts labels --- fragments/labels/applenyfonts.sh | 2 +- fragments/labels/applesfcompact.sh | 2 +- fragments/labels/applesfpro.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fragments/labels/applenyfonts.sh b/fragments/labels/applenyfonts.sh index 16c7185..fe4f258 100644 --- a/fragments/labels/applenyfonts.sh +++ b/fragments/labels/applenyfonts.sh @@ -3,5 +3,5 @@ applenyfonts) type="pkgInDmg" downloadURL="https://devimages-cdn.apple.com/design/resources/download/NY.dmg" packageID="com.apple.pkg.NYFonts" - expectedTeamID="Development Update" + expectedTeamID="Software Update" ;; diff --git a/fragments/labels/applesfcompact.sh b/fragments/labels/applesfcompact.sh index aef7977..5f4bcf2 100644 --- a/fragments/labels/applesfcompact.sh +++ b/fragments/labels/applesfcompact.sh @@ -3,5 +3,5 @@ applesfcompact) type="pkgInDmg" downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg" packageID="com.apple.pkg.SanFranciscoCompact" - expectedTeamID="Development Update" + expectedTeamID="Software Update" ;; diff --git a/fragments/labels/applesfpro.sh b/fragments/labels/applesfpro.sh index 9d76895..fecd78a 100644 --- a/fragments/labels/applesfpro.sh +++ b/fragments/labels/applesfpro.sh @@ -3,5 +3,5 @@ applesfpro) type="pkgInDmg" downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" packageID="com.apple.pkg.SanFranciscoPro" - expectedTeamID="Development Update" + expectedTeamID="Software Update" ;; From 61196b3da6f8b84a695f0f1844f563f3118d0415 Mon Sep 17 00:00:00 2001 From: AP Orlebeke Date: Wed, 22 Dec 2021 14:43:16 -0500 Subject: [PATCH 08/23] Add secretive --- fragments/labels/secretive.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/secretive.sh diff --git a/fragments/labels/secretive.sh b/fragments/labels/secretive.sh new file mode 100644 index 0000000..131c94d --- /dev/null +++ b/fragments/labels/secretive.sh @@ -0,0 +1,7 @@ +secretive) + name="Secretive" + type="zip" + downloadURL=$(downloadURLFromGit maxgoedjen secretive) + appNewVersion=$(versionFromGit maxgoedjen secretive) + expectedTeamID="Z72PRUAWF6" + ;; \ No newline at end of file From d135ca1c4d44fef572ba8b5c7011b6f7f10f6eb6 Mon Sep 17 00:00:00 2001 From: John Hutchison Date: Thu, 23 Dec 2021 09:17:37 -0500 Subject: [PATCH 09/23] Updated URL for Box Drive Box now makes a universal installer for all architectures. Installomator debug output follows; ./assemble.sh boxdrive 2021-12-23 09:16:22 boxdrive ################## Start Installomator v. 9.0dev 2021-12-23 09:16:22 boxdrive ################## boxdrive 2021-12-23 09:16:22 boxdrive DEBUG mode 1 enabled. 2021-12-23 09:16:23 boxdrive BLOCKING_PROCESS_ACTION=tell_user 2021-12-23 09:16:23 boxdrive NOTIFY=success 2021-12-23 09:16:23 boxdrive LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2021-12-23 09:16:23 boxdrive no blocking processes defined, using Box as default 2021-12-23 09:16:23 boxdrive Changing directory to /Users/john/Documents/Source/Installomator/build 2021-12-23 09:16:23 boxdrive App(s) found: 2021-12-23 09:16:23 boxdrive could not find Box.app 2021-12-23 09:16:23 boxdrive appversion: 2021-12-23 09:16:23 boxdrive Latest version not specified. 2021-12-23 09:16:23 boxdrive Downloading https://e3.boxcdn.net/box-installers/desktop/releases/mac/Box.pkg to Box.pkg 2021-12-23 09:16:25 boxdrive DEBUG mode, not checking for blocking processes 2021-12-23 09:16:25 boxdrive Installing Box 2021-12-23 09:16:25 boxdrive Verifying: Box.pkg 2021-12-23 09:16:25 boxdrive Team ID: M683GB7CPW (expected: M683GB7CPW ) 2021-12-23 09:16:25 boxdrive DEBUG enabled, skipping installation 2021-12-23 09:16:25 boxdrive Finishing... 2021-12-23 09:16:35 boxdrive App(s) found: 2021-12-23 09:16:35 boxdrive could not find Box.app 2021-12-23 09:16:35 boxdrive Installed Box 2021-12-23 09:16:35 boxdrive notifying 2021-12-23 09:16:35 boxdrive DEBUG mode, not reopening anything 2021-12-23 09:16:35 boxdrive ################## End Installomator, exit code 0 --- fragments/labels/boxdrive.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/fragments/labels/boxdrive.sh b/fragments/labels/boxdrive.sh index cf5fc1d..5252dd3 100644 --- a/fragments/labels/boxdrive.sh +++ b/fragments/labels/boxdrive.sh @@ -2,11 +2,6 @@ boxdrive) # credit: Isaac Ordonez, Mann consulting (@mannconsulting) name="Box" type="pkg" - if [[ $(arch) == "arm64" ]]; then - #Note: https://support.box.com/hc/en-us/articles/1500004479962-Box-Drive-support-on-devices-with-M1-chips - downloadURL="https://e3.boxcdn.net/desktop/pre-releases/mac/BoxDrive.2.20.140-M1-beta.pkg" - elif [[ $(arch) == "i386" ]]; then - downloadURL="https://e3.boxcdn.net/box-installers/desktop/releases/mac/Box.pkg" - fi + downloadURL="https://e3.boxcdn.net/box-installers/desktop/releases/mac/Box.pkg" expectedTeamID="M683GB7CPW" ;; From ff621c791694ff1a8622b8ca022edb7b872d1918 Mon Sep 17 00:00:00 2001 From: Jeff Finlay Date: Thu, 23 Dec 2021 13:33:52 -0500 Subject: [PATCH 10/23] Create iina Label for IINA --- fragments/labels/iina | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/iina diff --git a/fragments/labels/iina b/fragments/labels/iina new file mode 100644 index 0000000..2ec2f28 --- /dev/null +++ b/fragments/labels/iina @@ -0,0 +1,7 @@ +iina) + name="IINA" + type="dmg" + downloadURL=$(downloadURLFromGit iina iina ) + appNewVersion=$(versionFromGit iina iina ) + expectedTeamID="67CQ77V27R" + ;; From c302cf63769082d06736c50050878efe294473e0 Mon Sep 17 00:00:00 2001 From: nestyurkin Date: Tue, 28 Dec 2021 19:22:11 +0300 Subject: [PATCH 11/23] Create Pritunl Label for Pritunl --- fragments/labels/pritunl.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fragments/labels/pritunl.sh diff --git a/fragments/labels/pritunl.sh b/fragments/labels/pritunl.sh new file mode 100644 index 0000000..c8050a6 --- /dev/null +++ b/fragments/labels/pritunl.sh @@ -0,0 +1,13 @@ +pritunl) + name="Pritunl" + type="pkgInZip" + if [[ $(arch) == "arm64" ]]; then + archiveName="Pritunl.arm64.pkg.zip" + downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron) + elif [[ $(arch) == "i386" ]]; then + archiveName="Pritunl.pkg.zip" + downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron) + fi + appNewVersion=$(versionFromGit pritunl pritunl-client-electron) + expectedTeamID="U22BLATN63" + ;; From 9797da6023310ba1ccab9da9be70821c27f99f67 Mon Sep 17 00:00:00 2001 From: nestyurkin Date: Wed, 29 Dec 2021 00:36:36 +0300 Subject: [PATCH 12/23] add packageID --- fragments/labels/pritunl.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/fragments/labels/pritunl.sh b/fragments/labels/pritunl.sh index c8050a6..d6b66c5 100644 --- a/fragments/labels/pritunl.sh +++ b/fragments/labels/pritunl.sh @@ -1,6 +1,7 @@ pritunl) name="Pritunl" type="pkgInZip" + packageID="com.pritunl.pkg.Pritunl" if [[ $(arch) == "arm64" ]]; then archiveName="Pritunl.arm64.pkg.zip" downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron) From bd261b1c63794b754bc9f7ee11ccc25c792f9d74 Mon Sep 17 00:00:00 2001 From: nestyurkin Date: Thu, 30 Dec 2021 23:49:35 +0300 Subject: [PATCH 13/23] minimize --- fragments/labels/pritunl.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fragments/labels/pritunl.sh b/fragments/labels/pritunl.sh index d6b66c5..8b35a64 100644 --- a/fragments/labels/pritunl.sh +++ b/fragments/labels/pritunl.sh @@ -4,11 +4,10 @@ pritunl) packageID="com.pritunl.pkg.Pritunl" if [[ $(arch) == "arm64" ]]; then archiveName="Pritunl.arm64.pkg.zip" - downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron) elif [[ $(arch) == "i386" ]]; then archiveName="Pritunl.pkg.zip" - downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron) fi + downloadURL=$(downloadURLFromGit pritunl pritunl-client-electron) appNewVersion=$(versionFromGit pritunl pritunl-client-electron) expectedTeamID="U22BLATN63" ;; From d645985184dccea91a1e9ca7f1f016e73ecc2f37 Mon Sep 17 00:00:00 2001 From: AP Orlebeke Date: Wed, 5 Jan 2022 15:26:55 -0500 Subject: [PATCH 14/23] Update textexpander download URL --- fragments/labels/textexpander.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/textexpander.sh b/fragments/labels/textexpander.sh index 6965ee7..63736f2 100644 --- a/fragments/labels/textexpander.sh +++ b/fragments/labels/textexpander.sh @@ -1,7 +1,7 @@ textexpander) name="TextExpander" type="dmg" - downloadURL="https://textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" - appNewVersion=$( curl -fsIL "https://textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" | grep -i "^location" | awk '{print $2}' | tail -1 | cut -d "_" -f2 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' ) + downloadURL="https://cgi.textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" + appNewVersion=$( curl -fsIL "https://cgi.textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" | grep -i "^location" | awk '{print $2}' | tail -1 | cut -d "_" -f2 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' ) expectedTeamID="7PKJ6G4DXL" ;; From 3b6e27f1fa36c1274d4c39b363fd5605ff2b3f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 7 Jan 2022 09:51:27 +0100 Subject: [PATCH 15/23] `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) --- fragments/functions.sh | 4 ++++ fragments/header.sh | 8 ++++++++ fragments/main.sh | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/fragments/functions.sh b/fragments/functions.sh index f5d5137..c49003d 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -18,6 +18,10 @@ cleanupAndExit() { # $1 = exit code, $2 message # If we closed any processes, reopen the app again reopenClosedProcess printlog "################## End Installomator, exit code $1 \n\n" + # if label is wrong and we wanted name of the label, then return ################## + if [[ $RETURN_LABEL_NAME -eq 1 ]]; then + echo "##################" + fi exit "$1" } diff --git a/fragments/header.sh b/fragments/header.sh index c41879d..a60c22b 100644 --- a/fragments/header.sh +++ b/fragments/header.sh @@ -103,6 +103,14 @@ REOPEN="yes" # - yes App wil 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. + # NOTE: How labels work diff --git a/fragments/main.sh b/fragments/main.sh index 493e2f7..e81fe03 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -5,6 +5,13 @@ ;; esac +# Are we only asked to return label name +if [[ $RETURN_LABEL_NAME -eq 1 ]]; then + printlog "Only returning label name." + printlog "$name" + echo "$name" + exit +fi # MARK: application download and installation starts here From a1afc4727e2e47ce817e73676de8cf9ff10f5827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sat, 8 Jan 2022 15:37:08 +0100 Subject: [PATCH 16/23] Update functions.sh 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 # ``` --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index c49003d..d70eee6 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -20,7 +20,7 @@ cleanupAndExit() { # $1 = exit code, $2 message printlog "################## End Installomator, exit code $1 \n\n" # if label is wrong and we wanted name of the label, then return ################## if [[ $RETURN_LABEL_NAME -eq 1 ]]; then - echo "##################" + echo "#" fi exit "$1" } From aa2f4146f74b637ad053e26e77a6ad4df7cd3736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 10:45:06 +0100 Subject: [PATCH 17/23] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f87508..6521dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## v9? - We have moved the root check to the beginning of the script, and improved DEBUG handling with two different modes. `DEBUG=0` is still for production, and `1` is still for the DEBUG we previously knew downloading to the directory it is running from, but `2` will download to temporary folder, will detect updates, but will not install anything, but it will notify the user (almost as running the script without root before). +- 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. ## v8.0 From 791fd45baea17bd7d6c512bf0ed50b54b11bb18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 11:23:57 +0100 Subject: [PATCH 18/23] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f87508..89e037f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## v9? - We have moved the root check to the beginning of the script, and improved DEBUG handling with two different modes. `DEBUG=0` is still for production, and `1` is still for the DEBUG we previously knew downloading to the directory it is running from, but `2` will download to temporary folder, will detect updates, but will not install anything, but it will notify the user (almost as running the script without root before). +- 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). + + ## v8.0 From 85a8fd09d977ed9c59c78a6835471f315843caa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 20:08:46 +0100 Subject: [PATCH 19/23] Update boxdrive.sh --- fragments/labels/boxdrive.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/fragments/labels/boxdrive.sh b/fragments/labels/boxdrive.sh index 5252dd3..dacd68b 100644 --- a/fragments/labels/boxdrive.sh +++ b/fragments/labels/boxdrive.sh @@ -1,5 +1,4 @@ boxdrive) - # credit: Isaac Ordonez, Mann consulting (@mannconsulting) name="Box" type="pkg" downloadURL="https://e3.boxcdn.net/box-installers/desktop/releases/mac/Box.pkg" From 7e059581adeff5d16776f3f20a5e2602cfdd7232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 20:13:49 +0100 Subject: [PATCH 20/23] Update secretive.sh --- fragments/labels/secretive.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fragments/labels/secretive.sh b/fragments/labels/secretive.sh index 131c94d..4873fb3 100644 --- a/fragments/labels/secretive.sh +++ b/fragments/labels/secretive.sh @@ -4,4 +4,5 @@ secretive) downloadURL=$(downloadURLFromGit maxgoedjen secretive) appNewVersion=$(versionFromGit maxgoedjen secretive) expectedTeamID="Z72PRUAWF6" - ;; \ No newline at end of file + ;; + From c1734bac7fb3621a5a0428cb183693afc2992b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 20:28:22 +0100 Subject: [PATCH 21/23] Update itsycal.sh --- fragments/labels/itsycal.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/itsycal.sh b/fragments/labels/itsycal.sh index 073a7c9..08d095b 100644 --- a/fragments/labels/itsycal.sh +++ b/fragments/labels/itsycal.sh @@ -1,8 +1,8 @@ itsycal) name="Itsycal" type="zip" - downloadURL="https://itsycal.s3.amazonaws.com/Itsycal.zip" - appNewVersion=$( curl -fsL https://www.mowglii.com/itsycal/versionhistory.html |grep -m1 'id="0' |awk -F '"' '{print $2}' ) + downloadURL=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal-apple-silicon.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2) + appNewVersion=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal-apple-silicon.xml | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2) blockingProcesses=( "Itsycal" ) expectedTeamID="HFT3T55WND" ;; From 02b0829877c2a0f79d153c89c7d644dc59b6ce5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 20:55:13 +0100 Subject: [PATCH 22/23] Update itsycal.sh --- fragments/labels/itsycal.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/fragments/labels/itsycal.sh b/fragments/labels/itsycal.sh index 08d095b..5153f36 100644 --- a/fragments/labels/itsycal.sh +++ b/fragments/labels/itsycal.sh @@ -3,6 +3,5 @@ itsycal) type="zip" downloadURL=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal-apple-silicon.xml | xpath '(//rss/channel/item/enclosure/@url)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2) appNewVersion=$(curl -fs https://s3.amazonaws.com/itsycal/itsycal-apple-silicon.xml | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | head -1 | cut -d '"' -f 2) - blockingProcesses=( "Itsycal" ) expectedTeamID="HFT3T55WND" ;; From 4d9348761b0948c0e89779190f7228929d63e08b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 21:15:52 +0100 Subject: [PATCH 23/23] Update tidal.sh --- fragments/labels/tidal.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/fragments/labels/tidal.sh b/fragments/labels/tidal.sh index 30690f8..c32febb 100644 --- a/fragments/labels/tidal.sh +++ b/fragments/labels/tidal.sh @@ -2,5 +2,6 @@ tidal) name="TIDAL" type="dmg" downloadURL="https://download.tidal.com/desktop/TIDAL.dmg" + appNewVersion=$(curl -fs https://update.tidal.com/updates/latest\?v\=1 | cut -d '"' -f4 | sed -E 's/https.*\/TIDAL\.([0-9.]*)\.zip/\1/g') expectedTeamID="GK2243L7KB" ;;