From 72257d21ae34a8c0f18eb2c745cb17bb6521468d Mon Sep 17 00:00:00 2001 From: John Hutchison Date: Wed, 24 Nov 2021 05:51:13 -0500 Subject: [PATCH 01/58] Updated URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated URL to match Zulu JDK8 style. Test output: Installomator - zulu-jdk-11-urlupdate! ❯ ./assemble.sh zulujdk11 2021-11-24 05:50:02 zulujdk11 ################## Start Installomator v. 9.0dev 2021-11-24 05:50:02 zulujdk11 ################## zulujdk11 2021-11-24 05:50:02 zulujdk11 DEBUG mode 1 enabled. 2021-11-24 05:50:02 zulujdk11 BLOCKING_PROCESS_ACTION=tell_user 2021-11-24 05:50:02 zulujdk11 NOTIFY=success 2021-11-24 05:50:02 zulujdk11 LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2021-11-24 05:50:02 zulujdk11 no blocking processes defined, using Zulu JDK 11 as default 2021-11-24 05:50:02 zulujdk11 Changing directory to /Users/john/Documents/Source/Installomator/build 2021-11-24 05:50:02 zulujdk11 Custom App Version detection is used, found be 2021-11-24 05:50:02 zulujdk11 appversion: be 2021-11-24 05:50:02 zulujdk11 Latest version of Zulu JDK 11 is 11.52.13 2021-11-24 05:50:02 zulujdk11 Downloading https://cdn.azul.com/zulu/bin/zulu11.52.13-ca-jdk11.0.13-macosx_aarch64.dmg to Zulu JDK 11.dmg 2021-11-24 05:50:07 zulujdk11 DEBUG mode, not checking for blocking processes 2021-11-24 05:50:07 zulujdk11 Installing Zulu JDK 11 2021-11-24 05:50:07 zulujdk11 Mounting /Users/john/Documents/Source/Installomator/build/Zulu JDK 11.dmg 2021-11-24 05:50:15 zulujdk11 Mounted: /Volumes/Azul Zulu JDK 11.52+13 2021-11-24 05:50:15 zulujdk11 found pkg: /Volumes/Azul Zulu JDK 11.52+13/Double-Click to Install Azul Zulu JDK 11.pkg 2021-11-24 05:50:15 zulujdk11 Verifying: /Volumes/Azul Zulu JDK 11.52+13/Double-Click to Install Azul Zulu JDK 11.pkg 2021-11-24 05:50:15 zulujdk11 Team ID: TDTHCUPYFR (expected: TDTHCUPYFR ) 2021-11-24 05:50:15 zulujdk11 Checking package version. Error encountered while creating /Volumes/Azul Zulu JDK 11.52+13/Double-Click to Install Azul Zulu JDK 11.pkg_pkg. Error 30: Read-only file system cat: /Volumes/Azul Zulu JDK 11.52+13/Double-Click to Install Azul Zulu JDK 11.pkg_pkg/Distribution: No such file or directory rm: /Volumes/Azul Zulu JDK 11.52+13/Double-Click to Install Azul Zulu JDK 11.pkg_pkg: No such file or directory 2021-11-24 05:50:15 zulujdk11 Downloaded package com.azulsystems.zulu.11 version 2021-11-24 05:50:15 zulujdk11 DEBUG enabled, skipping installation 2021-11-24 05:50:15 zulujdk11 Finishing... 2021-11-24 05:50:25 zulujdk11 Custom App Version detection is used, found be 2021-11-24 05:50:25 zulujdk11 Installed Zulu JDK 11, version be 2021-11-24 05:50:25 zulujdk11 notifying 2021-11-24 05:50:26 zulujdk11 Unmounting /Volumes/Azul Zulu JDK 11.52+13 "disk4" ejected. 2021-11-24 05:50:26 zulujdk11 DEBUG mode, not reopening anything 2021-11-24 05:50:26 zulujdk11 ################## End Installomator, exit code 0 --- fragments/labels/zulujdk11.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/zulujdk11.sh b/fragments/labels/zulujdk11.sh index 22fdb31..dd30b26 100644 --- a/fragments/labels/zulujdk11.sh +++ b/fragments/labels/zulujdk11.sh @@ -3,9 +3,9 @@ zulujdk11) type="pkgInDmg" packageID="com.azulsystems.zulu.11" if [[ $(arch) == i386 ]]; then - downloadURL=$(curl -fs "https://www.azul.com/downloads/zulu-community/" | xmllint --html --format - 2>/dev/null | tr , '\n' | grep -o "https:.*/zulu11.*ca-jdk11.*x64.dmg" | sed 's/\\//g') + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu11.*ca-jdk11.*x64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) elif [[ $(arch) == arm64 ]]; then - downloadURL=$(curl -fs "https://www.azul.com/downloads/zulu-community/" | xmllint --html --format - 2>/dev/null | tr , '\n' | grep -o "https:.*/zulu11.*ca-jdk11.*aarch64.dmg" | sed 's/\\//g') + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu11.*ca-jdk11.*aarch64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) fi expectedTeamID="TDTHCUPYFR" appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" } From 4471169fe47147df7866fd8c9547c09d6b7ba1f1 Mon Sep 17 00:00:00 2001 From: John Hutchison Date: Wed, 24 Nov 2021 05:55:38 -0500 Subject: [PATCH 02/58] Updated URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated URL to match Zulu JDK 8 style Example output: Installomator - zulu-jdk-15-urlupdate! ❯ ./assemble.sh zulujdk15 2021-11-24 05:54:37 zulujdk15 ################## Start Installomator v. 9.0dev 2021-11-24 05:54:37 zulujdk15 ################## zulujdk15 2021-11-24 05:54:37 zulujdk15 DEBUG mode 1 enabled. 2021-11-24 05:54:37 zulujdk15 BLOCKING_PROCESS_ACTION=tell_user 2021-11-24 05:54:37 zulujdk15 NOTIFY=success 2021-11-24 05:54:37 zulujdk15 LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2021-11-24 05:54:37 zulujdk15 no blocking processes defined, using Zulu JDK 15 as default 2021-11-24 05:54:37 zulujdk15 Changing directory to /Users/john/Documents/Source/Installomator/build 2021-11-24 05:54:37 zulujdk15 Custom App Version detection is used, found be 2021-11-24 05:54:37 zulujdk15 appversion: be 2021-11-24 05:54:37 zulujdk15 Latest version of Zulu JDK 15 is 15.36.13 2021-11-24 05:54:37 zulujdk15 Downloading https://cdn.azul.com/zulu/bin/zulu15.36.13-ca-jdk15.0.5-macosx_aarch64.dmg to Zulu JDK 15.dmg 2021-11-24 05:54:42 zulujdk15 DEBUG mode, not checking for blocking processes 2021-11-24 05:54:42 zulujdk15 Installing Zulu JDK 15 2021-11-24 05:54:42 zulujdk15 Mounting /Users/john/Documents/Source/Installomator/build/Zulu JDK 15.dmg 2021-11-24 05:54:50 zulujdk15 Mounted: /Volumes/Azul Zulu JDK 15.36+13 2021-11-24 05:54:50 zulujdk15 found pkg: /Volumes/Azul Zulu JDK 15.36+13/Double-Click to Install Azul Zulu JDK 15.pkg 2021-11-24 05:54:50 zulujdk15 Verifying: /Volumes/Azul Zulu JDK 15.36+13/Double-Click to Install Azul Zulu JDK 15.pkg 2021-11-24 05:54:50 zulujdk15 Team ID: TDTHCUPYFR (expected: TDTHCUPYFR ) 2021-11-24 05:54:50 zulujdk15 Checking package version. Error encountered while creating /Volumes/Azul Zulu JDK 15.36+13/Double-Click to Install Azul Zulu JDK 15.pkg_pkg. Error 30: Read-only file system cat: /Volumes/Azul Zulu JDK 15.36+13/Double-Click to Install Azul Zulu JDK 15.pkg_pkg/Distribution: No such file or directory rm: /Volumes/Azul Zulu JDK 15.36+13/Double-Click to Install Azul Zulu JDK 15.pkg_pkg: No such file or directory 2021-11-24 05:54:50 zulujdk15 Downloaded package com.azulsystems.zulu.15 version 2021-11-24 05:54:50 zulujdk15 DEBUG enabled, skipping installation 2021-11-24 05:54:50 zulujdk15 Finishing... 2021-11-24 05:55:00 zulujdk15 Custom App Version detection is used, found be 2021-11-24 05:55:00 zulujdk15 Installed Zulu JDK 15, version be 2021-11-24 05:55:00 zulujdk15 notifying 2021-11-24 05:55:00 zulujdk15 Unmounting /Volumes/Azul Zulu JDK 15.36+13 "disk4" ejected. 2021-11-24 05:55:00 zulujdk15 DEBUG mode, not reopening anything 2021-11-24 05:55:00 zulujdk15 ################## End Installomator, exit code 0 --- fragments/labels/zulujdk15.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/zulujdk15.sh b/fragments/labels/zulujdk15.sh index 49f1188..db2e7fc 100644 --- a/fragments/labels/zulujdk15.sh +++ b/fragments/labels/zulujdk15.sh @@ -3,9 +3,9 @@ zulujdk15) type="pkgInDmg" packageID="com.azulsystems.zulu.15" if [[ $(arch) == i386 ]]; then - downloadURL=$(curl -fs "https://www.azul.com/downloads/zulu-community/" | xmllint --html --format - 2>/dev/null | tr , '\n' | grep -o "https:.*/zulu15.*ca-jdk15.*x64.dmg" | sed 's/\\//g') + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu15.*ca-jdk15.*x64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) elif [[ $(arch) == arm64 ]]; then - downloadURL=$(curl -fs "https://www.azul.com/downloads/zulu-community/" | xmllint --html --format - 2>/dev/null | tr , '\n' | grep -o "https:.*/zulu15.*ca-jdk15.*aarch64.dmg" | sed 's/\\//g') + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu15.*ca-jdk15.*aarch64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) fi expectedTeamID="TDTHCUPYFR" appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" } From f73b1af054c653f8e8fa40f2d736398f1607d7d4 Mon Sep 17 00:00:00 2001 From: John Hutchison Date: Wed, 24 Nov 2021 06:01:51 -0500 Subject: [PATCH 03/58] New label for Azul Zulu JDK 17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Example output: Installomator - zulu-jdk-15-urlupdate! ❯ ./assemble.sh zulujdk17 2021-11-24 06:00:42 zulujdk17 ################## Start Installomator v. 9.0dev 2021-11-24 06:00:42 zulujdk17 ################## zulujdk17 2021-11-24 06:00:42 zulujdk17 DEBUG mode 1 enabled. 2021-11-24 06:00:44 zulujdk17 BLOCKING_PROCESS_ACTION=tell_user 2021-11-24 06:00:44 zulujdk17 NOTIFY=success 2021-11-24 06:00:44 zulujdk17 LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2021-11-24 06:00:44 zulujdk17 no blocking processes defined, using Zulu JDK 17 as default 2021-11-24 06:00:44 zulujdk17 Changing directory to /Users/john/Documents/Source/Installomator/build 2021-11-24 06:00:44 zulujdk17 Custom App Version detection is used, found be 2021-11-24 06:00:44 zulujdk17 appversion: be 2021-11-24 06:00:44 zulujdk17 Latest version of Zulu JDK 17 is 17.30.15 2021-11-24 06:00:44 zulujdk17 Downloading https://cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-macosx_aarch64.dmg to Zulu JDK 17.dmg 2021-11-24 06:00:49 zulujdk17 DEBUG mode, not checking for blocking processes 2021-11-24 06:00:49 zulujdk17 Installing Zulu JDK 17 2021-11-24 06:00:49 zulujdk17 Mounting /Users/john/Documents/Source/Installomator/build/Zulu JDK 17.dmg 2021-11-24 06:00:57 zulujdk17 Mounted: /Volumes/Azul Zulu JDK 17.30+15 2021-11-24 06:00:57 zulujdk17 found pkg: /Volumes/Azul Zulu JDK 17.30+15/Double-Click to Install Azul Zulu JDK 17.pkg 2021-11-24 06:00:57 zulujdk17 Verifying: /Volumes/Azul Zulu JDK 17.30+15/Double-Click to Install Azul Zulu JDK 17.pkg 2021-11-24 06:00:57 zulujdk17 Team ID: TDTHCUPYFR (expected: TDTHCUPYFR ) 2021-11-24 06:00:57 zulujdk17 Checking package version. Error encountered while creating /Volumes/Azul Zulu JDK 17.30+15/Double-Click to Install Azul Zulu JDK 17.pkg_pkg. Error 30: Read-only file system cat: /Volumes/Azul Zulu JDK 17.30+15/Double-Click to Install Azul Zulu JDK 17.pkg_pkg/Distribution: No such file or directory rm: /Volumes/Azul Zulu JDK 17.30+15/Double-Click to Install Azul Zulu JDK 17.pkg_pkg: No such file or directory 2021-11-24 06:00:57 zulujdk17 Downloaded package com.azulsystems.zulu.17 version 2021-11-24 06:00:57 zulujdk17 DEBUG enabled, skipping installation 2021-11-24 06:00:57 zulujdk17 Finishing... 2021-11-24 06:01:07 zulujdk17 Custom App Version detection is used, found be 2021-11-24 06:01:07 zulujdk17 Installed Zulu JDK 17, version be 2021-11-24 06:01:07 zulujdk17 notifying 2021-11-24 06:01:07 zulujdk17 Unmounting /Volumes/Azul Zulu JDK 17.30+15 "disk4" ejected. 2021-11-24 06:01:07 zulujdk17 DEBUG mode, not reopening anything 2021-11-24 06:01:07 zulujdk17 ################## End Installomator, exit code 0 --- fragments/labels/zulujdk17.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fragments/labels/zulujdk17.sh diff --git a/fragments/labels/zulujdk17.sh b/fragments/labels/zulujdk17.sh new file mode 100644 index 0000000..5d3902f --- /dev/null +++ b/fragments/labels/zulujdk17.sh @@ -0,0 +1,13 @@ +zulujdk17) + name="Zulu JDK 17" + type="pkgInDmg" + packageID="com.azulsystems.zulu.17" + if [[ $(arch) == i386 ]]; then + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu17.*ca-jdk17.*x64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) + elif [[ $(arch) == arm64 ]]; then + downloadURL=https://cdn.azul.com/zulu/bin/$(curl -fs "https://cdn.azul.com/zulu/bin/" | grep -Eio '">zulu17.*ca-jdk17.*aarch64.dmg(.*)' | cut -c3- | sed 's/<\/a>//' | sed -E 's/([0-9.]*)M//' | awk '{print $2 $1}' | sort | cut -c11- | tail -1) + fi + expectedTeamID="TDTHCUPYFR" + appCustomVersion(){ java -version 2>&1 | grep Runtime | awk '{print $4}' | sed -e "s/.*Zulu//" | cut -d '-' -f 1 | sed -e "s/+/\./" } + appNewVersion=$(echo "$downloadURL" | cut -d "-" -f 1 | sed -e "s/.*zulu//") # Cannot be compared to anything + ;; From b80c33320f821dc506387484011411ead2ec907b Mon Sep 17 00:00:00 2001 From: AP Orlebeke Date: Fri, 26 Nov 2021 12:52:31 -0500 Subject: [PATCH 04/58] Add Flux --- fragments/labels/flux.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 fragments/labels/flux.sh diff --git a/fragments/labels/flux.sh b/fragments/labels/flux.sh new file mode 100644 index 0000000..af9338f --- /dev/null +++ b/fragments/labels/flux.sh @@ -0,0 +1,6 @@ +flux) + name="Flux" + type="zip" + downloadURL="https://justgetflux.com/mac/Flux.zip" + expectedTeamID="VZKSA7H9J9" + ;; \ No newline at end of file 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 05/58] 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 06/58] 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 5a34a35e868f2e14b570da76b2a6d6635a8cf39d Mon Sep 17 00:00:00 2001 From: Austin Leath Date: Wed, 1 Dec 2021 15:30:16 -0600 Subject: [PATCH 07/58] Plenty of grammar fixes --- fragments/header.sh | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/fragments/header.sh b/fragments/header.sh index c41879d..cf507b2 100644 --- a/fragments/header.sh +++ b/fragments/header.sh @@ -23,8 +23,8 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin # set to 0 for production, 1 or 2 for debugging # 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 version -# debug mode 2 will download to the temp directory, check for blocking processes, check version, but will not install anything or remove the current version +# 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 @@ -39,14 +39,14 @@ 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). +# (only if the user accepts to quit the apps, otherwise +# the update is canceled). # - prompt_user_then_kill # show a user dialog for each blocking process found, # attempt to quit two times, kill the process finally @@ -54,10 +54,10 @@ BLOCKING_PROCESS_ACTION=tell_user # 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 scripts get stuck 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 +# - tell_user User will be shown a notification about the important update, +# but the 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 @@ -81,18 +81,18 @@ 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. # 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 @@ -100,7 +100,7 @@ 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 @@ -126,7 +126,7 @@ REOPEN="yes" # # - packageID: (optional) # The package ID of a pkg -# 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 # @@ -136,7 +136,7 @@ REOPEN="yes" # # - 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) @@ -207,10 +207,10 @@ REOPEN="yes" # # - CLIInstaller: # - CLIArguments: -# If the downloaded dmg is actually an installer that we can call using CLI, we can +# 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 that `name`. Installomator +# `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 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 08/58] 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 09/58] 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 10/58] 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 11/58] 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 c7b5f89a4cd00c8954d121d0f5853e4cd92b8210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Tue, 14 Dec 2021 15:42:49 +0100 Subject: [PATCH 12/58] Update depnotify.sh --- fragments/labels/depnotify.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fragments/labels/depnotify.sh b/fragments/labels/depnotify.sh index 50a7155..2f9f6b7 100644 --- a/fragments/labels/depnotify.sh +++ b/fragments/labels/depnotify.sh @@ -1,7 +1,8 @@ depnotify) name="DEPNotify" - type="zip" - downloadURL="https://files.nomad.menu/DEPNotify.zip" + type="pkg" + #packageID="menu.nomad.depnotify" + downloadURL="https://files.nomad.menu/DEPNotify.pkg" + #appNewVersion=$() expectedTeamID="VRPY9KHGX6" - targetDir="/Applications/Utilities" ;; From 9178cf8fe58e279ca89c8ce7c1002f46ec8be27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Thu, 16 Dec 2021 09:15:43 +0100 Subject: [PATCH 13/58] Apple fonts --- 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 a4fe0d65ec548a3a5be3fd73ca01d6568b027a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 17 Dec 2021 14:48:24 +0100 Subject: [PATCH 14/58] Create ibarcoder.sh --- fragments/labels/ibarcoder.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/ibarcoder.sh diff --git a/fragments/labels/ibarcoder.sh b/fragments/labels/ibarcoder.sh new file mode 100644 index 0000000..7752c92 --- /dev/null +++ b/fragments/labels/ibarcoder.sh @@ -0,0 +1,7 @@ +ibarcoder) + name="iBarcoder" + type="dmg" + downloadURL="https://cristallight.com/Downloads/mac/ibarcoder.dmg" + appNewVersion="$(curl -fs "https://cristallight.com/iBarcoder/" | grep -i version: | head -1 | awk '{print $2}')" + expectedTeamID="JAXVB9AH9M" + ;; 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 15/58] 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 6db60dd6418165df803174a581e914d17e8983b5 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Mon, 20 Dec 2021 14:35:11 +0100 Subject: [PATCH 16/58] version checking pkgInDMG would attempt to expand the pkg into the read-only dmg, also simplified the xpath call --- fragments/functions.sh | 47 +++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index f5d5137..42b0447 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -66,7 +66,7 @@ log_location="/private/var/log/Installomator.log" printlog(){ timestamp=$(date +%F\ %T) - + if [[ "$(whoami)" == "root" ]]; then echo "$timestamp" "$label" "$1" | tee -a $log_location else @@ -78,7 +78,7 @@ printlog(){ downloadURLFromGit() { # $1 git user name, $2 git repo name gitusername=${1?:"no git user name"} gitreponame=${2?:"no git repo name"} - + if [[ $type == "pkgInDmg" ]]; then filetype="dmg" elif [[ $type == "pkgInZip" ]]; then @@ -86,7 +86,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name else filetype=$type fi - + if [ -n "$archiveName" ]; then downloadURL=$(curl --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" \ | awk -F '"' "/browser_download_url/ && /$archiveName\"/ { print \$4; exit }") @@ -108,7 +108,7 @@ versionFromGit() { # $1 git user name, $2 git repo name gitusername=${1?:"no git user name"} gitreponame=${2?:"no git repo name"} - + appNewVersion=$(curl --silent --fail "https://api.github.com/repos/$gitusername/$gitreponame/releases/latest" | grep tag_name | cut -d '"' -f 4 | sed 's/[^0-9\.]//g') if [ -z "$appNewVersion" ]; then printlog "could not retrieve version number for $gitusername/$gitreponame" @@ -122,7 +122,7 @@ versionFromGit() { # Handling of differences in xpath between Catalina and Big Sur xpath() { - # the xpath tool changes in Big Sur and now requires the `-e` option + # the xpath tool changes in Big Sur and now requires the `-e` option if [[ $(sw_vers -buildVersion) > "20A" ]]; then /usr/bin/xpath -e $@ # alternative: switch to xmllint (which is not perl) @@ -142,7 +142,7 @@ getAppVersion() { printlog "Custom App Version detection is used, found $appversion" return fi - + # pkgs contains a version number, then we don't have to search for an app if [[ $packageID != "" ]]; then appversion="$(pkgutil --pkg-info-plist ${packageID} 2>/dev/null | grep -A 1 pkg-version | tail -1 | sed -E 's/.*>([0-9.]*)<.*/\1/g')" @@ -154,7 +154,7 @@ getAppVersion() { printlog "No version found using packageID $packageID" fi fi - + # get app in /Applications, or /Applications/Utilities, or find using Spotlight if [[ -d "/Applications/$appName" ]]; then applist="/Applications/$appName" @@ -211,7 +211,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" @@ -298,7 +298,7 @@ checkRunningProcesses() { reopenClosedProcess() { # If Installomator closed any processes, let's get the app opened again # credit: Søren Theilgaard (@theilgaard) - + # don't reopen if REOPEN is not "yes" if [[ $REOPEN != yes ]]; then printlog "REOPEN=no, not reopening anything" @@ -310,7 +310,7 @@ reopenClosedProcess() { printlog "DEBUG mode 1, not reopening anything" return fi - + if [[ $appClosed == 1 ]]; then printlog "Telling app $appName to open" #runAsUser osascript -e "tell app \"$appName\" to open" @@ -375,10 +375,10 @@ installAppWithPath() { # $1: path to app to install in $targetDir printlog "DEBUG mode 2 enabled, exiting" cleanupAndExit 0 fi - + # Test if variable CLIInstaller is set if [[ -z $CLIInstaller ]]; then - + # remove existing application if [ -e "$targetDir/$appName" ]; then printlog "Removing existing $targetDir/$appName" @@ -441,12 +441,12 @@ installFromDMG() { installFromPKG() { # verify with spctl printlog "Verifying: $archiveName" - + if ! spctlout=$(spctl -a -vv -t install "$archiveName" 2>&1 ); then printlog "Error verifying $archiveName" cleanupAndExit 4 fi - + teamID=$(echo $spctlout | awk -F '(' '/origin=/ {print $2 }' | tr -d '()' ) # Apple signed software has no teamID, grab entire origin instead @@ -465,10 +465,11 @@ installFromPKG() { # Check version of pkg to be installed if packageID is set if [[ $packageID != "" && $appversion != "" ]]; then printlog "Checking package version." - pkgutil --expand "$archiveName" "$archiveName"_pkg - #printlog "$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null)" - appNewVersion=$(cat "$archiveName"_pkg/Distribution | xpath '//installer-gui-script/pkg-ref[@id][@version]' 2>/dev/null | grep -i "$packageID" | tr ' ' '\n' | grep -i version | cut -d \" -f 2) #sed -E 's/.*\"([0-9.]*)\".*/\1/g' - rm -r "$archiveName"_pkg + baseArchiveName=$(basename $archiveName) + expandedPkg="$tmpDir/${baseArchiveName}_pkg" + pkgutil --expand "$archiveName" "$expandedPkg" + appNewVersion=$(cat "$expandedPkg"/Distribution | xpath 'string(//installer-gui-script/pkg-ref[@id][@version]/@version)' 2>/dev/null ) + rm -r "$expandedPkg" printlog "Downloaded package $packageID version $appNewVersion" if [[ $appversion == $appNewVersion ]]; then printlog "Downloaded version of $name is the same as installed." @@ -484,7 +485,7 @@ installFromPKG() { fi fi fi - + # skip install for DEBUG 1 if [ "$DEBUG" -eq 1 ]; then printlog "DEBUG enabled, skipping installation" @@ -494,7 +495,7 @@ installFromPKG() { # skip install for DEBUG 2 if [ "$DEBUG" -eq 2 ]; then printlog "DEBUG mode 2 enabled, exiting" - cleanupAndExit 0 + cleanupAndExit 0 fi # install pkg @@ -508,17 +509,17 @@ installFromPKG() { installFromZIP() { # unzip the archive printlog "Unzipping $archiveName" - + # tar -xf "$archiveName" # note: when you expand a zip using tar in Mojave the expanded # app will never pass the spctl check # unzip -o -qq "$archiveName" - + # note: githubdesktop fails spctl verification when expanded # with unzip - + ditto -x -k "$archiveName" "$tmpDir" installAppWithPath "$tmpDir/$appName" } From 61196b3da6f8b84a695f0f1844f563f3118d0415 Mon Sep 17 00:00:00 2001 From: AP Orlebeke Date: Wed, 22 Dec 2021 14:43:16 -0500 Subject: [PATCH 17/58] 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 18/58] 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 19/58] 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 20/58] 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 21/58] 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 dac472f6d17f784e7fe88dd7b0156ac786b079ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Wed, 29 Dec 2021 13:28:29 +0100 Subject: [PATCH 22/58] Create applesfarabic.sh --- fragments/labels/applesfarabic.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/applesfarabic.sh diff --git a/fragments/labels/applesfarabic.sh b/fragments/labels/applesfarabic.sh new file mode 100644 index 0000000..811d26c --- /dev/null +++ b/fragments/labels/applesfarabic.sh @@ -0,0 +1,7 @@ +applesfarabic) + name="San Francisco Arabic" + type="pkgInDmg" + downloadURL="https://devimages-cdn.apple.com/design/resources/download/SF-Arabic.dmg" + packageID="com.apple.pkg.SFArabicFonts" + expectedTeamID="Software Update" + ;; From 2c4bef35248297a4b1526afaa6294b165bc2ae1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Wed, 29 Dec 2021 13:37:16 +0100 Subject: [PATCH 23/58] Update applesfsymbols.sh --- fragments/labels/applesfsymbols.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/applesfsymbols.sh b/fragments/labels/applesfsymbols.sh index b4f2764..97b93de 100644 --- a/fragments/labels/applesfsymbols.sh +++ b/fragments/labels/applesfsymbols.sh @@ -2,7 +2,7 @@ applesfsymbols|\ sfsymbols) name="SF Symbols" type="pkgInDmg" - downloadURL=$( curl -fs "https://developer.apple.com/sf-symbols/" | grep -oe "https.*\.dmg" | head -1 ) - appNewVersion=$( echo "$downloadURL" | head -1 | sed -E 's/.*SF-Symbols-([0-9.]*)\..*/\1/g') + downloadURL=$( curl -fs "https://developer.apple.com/sf-symbols/" | grep -oe "https.*Symbols.*\.dmg" | head -1 ) + appNewVersion=$( echo "$downloadURL" | sed -E 's/.*SF-Symbols-([0-9.]*)\..*/\1/g') expectedTeamID="Software Update" ;; From 1a1ad30b66571b92f1c558b7c0d775aa1a9acf09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Thu, 30 Dec 2021 20:09:10 +0100 Subject: [PATCH 24/58] mightymike and ottomatic --- fragments/broken/mightymike.sh | 2 +- fragments/labels/ottomatic.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fragments/broken/mightymike.sh b/fragments/broken/mightymike.sh index b241a6a..733fafa 100644 --- a/fragments/broken/mightymike.sh +++ b/fragments/broken/mightymike.sh @@ -1,5 +1,5 @@ mightymike) - name="Nanosaur" + name="Mighty Mike" type="dmg" downloadURL=$(downloadURLFromGit jorio MightyMike) appNewVersion=$(versionFromGit jorio MightyMike) diff --git a/fragments/labels/ottomatic.sh b/fragments/labels/ottomatic.sh index f2e1c5a..68ed521 100644 --- a/fragments/labels/ottomatic.sh +++ b/fragments/labels/ottomatic.sh @@ -5,4 +5,3 @@ ottomatic) appNewVersion=$(versionFromGit jorio OttoMatic) expectedTeamID="RVNL7XC27G" ;; - From bd261b1c63794b754bc9f7ee11ccc25c792f9d74 Mon Sep 17 00:00:00 2001 From: nestyurkin Date: Thu, 30 Dec 2021 23:49:35 +0300 Subject: [PATCH 25/58] 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 1fdbef74c183b45273900d8ef56bd45c6cfc5ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 2 Jan 2022 20:15:42 +0100 Subject: [PATCH 26/58] Update logitechoptions.sh --- fragments/labels/logitechoptions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/logitechoptions.sh b/fragments/labels/logitechoptions.sh index 48409a0..d0278d3 100644 --- a/fragments/labels/logitechoptions.sh +++ b/fragments/labels/logitechoptions.sh @@ -1,9 +1,9 @@ logitechoptions) - # credit: AP Orlebeke (@apizz) name="Logitech Options" type="pkgInZip" downloadURL=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}') #appNewVersion=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}' | sed -E 's/.*_([0-9\.]*)[-\.].*/\1/' ) - pkgName="LogiMgr Installer ${appNewVersion}.app/Contents/Resources/LogiMgr.pkg" + #pkgName="LogiMgr Installer ${appNewVersion}.app/Contents/Resources/LogiMgr.pkg" + pkgName="LogiMgr Installer [0-9.]*.app/Contents/Resources/LogiMgr.pkg" expectedTeamID="QED4VVPZWA" ;; From 61b05ff31e78f8cf3c7793c5d62af239808f6e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 3 Jan 2022 09:09:30 +0100 Subject: [PATCH 27/58] Update brave.sh This is a special construction of the `appNewVersion` variable. Not sure this is future proof, but the current one was not working. --- fragments/labels/brave.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fragments/labels/brave.sh b/fragments/labels/brave.sh index 44a3e90..afd3199 100644 --- a/fragments/labels/brave.sh +++ b/fragments/labels/brave.sh @@ -1,15 +1,14 @@ brave) - # credit: @securitygeneration name="Brave Browser" type="dmg" if [[ $(arch) != "i386" ]]; then printlog "Architecture: arm64 (not i386)" - downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osxarm64/release | grep -i "^location" | awk '{print $2}' | tr -d '\r\n') + downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osxarm64/release | grep -i "^location" | awk '{print $2}') else printlog "Architecture: i386" - downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osx/release | grep -i "^location" | awk '{print $2}' | tr -d '\r\n') + downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osx/release | grep -i "^location" | awk '{print $2}') fi -# downloadURL=$(curl --location --fail --silent "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2) - appNewVersion=$(curl --location --fail --silent "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2) +# downloadURL=$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2) + appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" expectedTeamID="KL8N8XSYF4" ;; From c499327e7d1f60e84ad3b427b06ed9fa94191615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 3 Jan 2022 10:18:27 +0100 Subject: [PATCH 28/58] Update brave.sh --- fragments/labels/brave.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fragments/labels/brave.sh b/fragments/labels/brave.sh index afd3199..0b4301b 100644 --- a/fragments/labels/brave.sh +++ b/fragments/labels/brave.sh @@ -4,11 +4,12 @@ brave) if [[ $(arch) != "i386" ]]; then printlog "Architecture: arm64 (not i386)" downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osxarm64/release | grep -i "^location" | awk '{print $2}') + appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" else printlog "Architecture: i386" downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osx/release | grep -i "^location" | awk '{print $2}') + appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" fi # downloadURL=$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2) - appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" expectedTeamID="KL8N8XSYF4" ;; From 85c8fecc357fcc43f9bc3a7a83a7de7e6d8ffd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Tue, 4 Jan 2022 10:52:53 +0100 Subject: [PATCH 29/58] Update brave.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brave is now using “CFBundleVersion” for the version check. That can be compared to the sparkle-feed. --- fragments/labels/brave.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fragments/labels/brave.sh b/fragments/labels/brave.sh index 0b4301b..6e16d6d 100644 --- a/fragments/labels/brave.sh +++ b/fragments/labels/brave.sh @@ -4,12 +4,15 @@ brave) if [[ $(arch) != "i386" ]]; then printlog "Architecture: arm64 (not i386)" downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osxarm64/release | grep -i "^location" | awk '{print $2}') - appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" + appNewVersion="$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2)" + #appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" else printlog "Architecture: i386" downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osx/release | grep -i "^location" | awk '{print $2}') - appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" + appNewVersion="$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2)" + #appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" fi + versionKey="CFBundleVersion" # downloadURL=$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@url' 2>/dev/null | cut -d '"' -f 2) expectedTeamID="KL8N8XSYF4" ;; From d645985184dccea91a1e9ca7f1f016e73ecc2f37 Mon Sep 17 00:00:00 2001 From: AP Orlebeke Date: Wed, 5 Jan 2022 15:26:55 -0500 Subject: [PATCH 30/58] 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 31/58] `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 21cee3a1ba35355c883b5bb21f5b6e3fd693fa6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 7 Jan 2022 10:35:57 +0100 Subject: [PATCH 32/58] signal is universal --- fragments/labels/signal.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fragments/labels/signal.sh b/fragments/labels/signal.sh index d9037ae..fa4585f 100644 --- a/fragments/labels/signal.sh +++ b/fragments/labels/signal.sh @@ -1,8 +1,7 @@ signal) - # credit: Søren Theilgaard (@theilgaard) name="Signal" type="dmg" - downloadURL=https://updates.signal.org/desktop/$(curl -fs https://updates.signal.org/desktop/latest-mac.yml | awk '/url/ && /dmg/ {print $3}') + downloadURL=https://updates.signal.org/desktop/$(curl -fs https://updates.signal.org/desktop/latest-mac.yml | awk '/url/ && /dmg/ {print $3}' | grep -i universal) appNewVersion=$(curl -fs https://updates.signal.org/desktop/latest-mac.yml | grep version | awk '{print $2}') expectedTeamID="U68MSDN6DR" ;; From 6c498dbf31c7f3b42734fa8797a29931ce850419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 7 Jan 2022 13:44:04 +0100 Subject: [PATCH 33/58] LSMinimumSystemVersion handling 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 ``` --- fragments/arguments.sh | 3 ++- fragments/functions.sh | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/fragments/arguments.sh b/fragments/arguments.sh index d682862..6c01519 100644 --- a/fragments/arguments.sh +++ b/fragments/arguments.sh @@ -1,7 +1,8 @@ # MARK: check minimal macOS requirement autoload is-at-least -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." exit 98 fi diff --git a/fragments/functions.sh b/fragments/functions.sh index f5d5137..b1ba7a0 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -345,8 +345,17 @@ installAppWithPath() { # $1: path to app to install in $targetDir cleanupAndExit 5 "Team IDs do not match" fi - # versioncheck - # credit: Søren Theilgaard (@theilgaard) + # macOS versioncheck + minimumOSversion=$(defaults read $appPath/Contents/Info.plist LSMinimumSystemVersion) + if [[ $minimumOSversion =~ '[0-9.]*' ]]; then + printlog "App has LSMinimumSystemVersion: $minimumOSversion" + if ! is-at-least $minimumOSversion $installedOSversion; then + printlog "App requires higher System Version than installed: $installedOSversion" + cleanupAndExit 6 "Installed macOS is too old for this app." + fi + fi + + # app versioncheck appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey) if [[ -n $appNewVersion && $appversion == $appNewVersion ]]; then printlog "Downloaded version of $name is $appNewVersion, same as installed." From 75e550acfe4912673343283a531f1701d2026936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 7 Jan 2022 14:07:21 +0100 Subject: [PATCH 34/58] notification Now with notification: ``` Installomator/utils/assemble.sh omnidisksweeper DEBUG=0 INSTALL=force NOTIFY=all 2022-01-07 14:05:25 omnidisksweeper setting variable from argument DEBUG=0 2022-01-07 14:05:25 omnidisksweeper setting variable from argument INSTALL=force 2022-01-07 14:05:25 omnidisksweeper setting variable from argument NOTIFY=all 2022-01-07 14:05:25 omnidisksweeper ################## Start Installomator v. 9.0dev 2022-01-07 14:05:25 omnidisksweeper ################## omnidisksweeper 2022-01-07 14:05:25 omnidisksweeper BLOCKING_PROCESS_ACTION=tell_user 2022-01-07 14:05:25 omnidisksweeper NOTIFY=all 2022-01-07 14:05:25 omnidisksweeper LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-01-07 14:05:26 omnidisksweeper no blocking processes defined, using OmniDiskSweeper as default 2022-01-07 14:05:26 omnidisksweeper Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.11IcaInb 2022-01-07 14:05:26 omnidisksweeper App(s) found: /Applications/OmniDiskSweeper.app 2022-01-07 14:05:26 omnidisksweeper found app at /Applications/OmniDiskSweeper.app, version 1.13 2022-01-07 14:05:26 omnidisksweeper appversion: 1.13 2022-01-07 14:05:26 omnidisksweeper Using force to install, so not using updateTool. 2022-01-07 14:05:26 omnidisksweeper Latest version of OmniDiskSweeper is 1.13 2022-01-07 14:05:26 omnidisksweeper There is no newer version available. 2022-01-07 14:05:26 omnidisksweeper Downloading https://downloads.omnigroup.com/software/MacOSX/10.14/OmniDiskSweeper-1.13.dmg to OmniDiskSweeper.dmg 2022-01-07 14:05:26 omnidisksweeper notifying 2022-01-07 14:05:28 omnidisksweeper no more blocking processes, continue with update 2022-01-07 14:05:28 omnidisksweeper Installing OmniDiskSweeper 2022-01-07 14:05:28 omnidisksweeper notifying 2022-01-07 14:05:28 omnidisksweeper Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.11IcaInb/OmniDiskSweeper.dmg 2022-01-07 14:05:29 omnidisksweeper Mounted: /Volumes/OmniDiskSweeper 2022-01-07 14:05:29 omnidisksweeper Verifying: /Volumes/OmniDiskSweeper/OmniDiskSweeper.app 2022-01-07 14:05:31 omnidisksweeper Team ID matching: 34YW5XSRB7 (expected: 34YW5XSRB7 ) 2022-01-07 14:05:31 omnidisksweeper Downloaded version of OmniDiskSweeper is 1.13, same as installed. 2022-01-07 14:05:31 omnidisksweeper Using force to install anyway. 2022-01-07 14:05:31 omnidisksweeper App has LSMinimumSystemVersion: 10.14 2022-01-07 14:05:32 omnidisksweeper App requires higher System Version than installed: 10.13.5 2022-01-07 14:05:32 omnidisksweeper notifying 2022-01-07 14:05:32 omnidisksweeper ERROR: Installed macOS is too old for this app. 2022-01-07 14:05:32 omnidisksweeper Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.11IcaInb 2022-01-07 14:05:32 omnidisksweeper Unmounting /Volumes/OmniDiskSweeper "disk4" ejected. 2022-01-07 14:05:32 omnidisksweeper App not closed, so no reopen. 2022-01-07 14:05:32 omnidisksweeper ################## End Installomator, exit code 6 ``` --- fragments/functions.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index b1ba7a0..02a5f86 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -345,16 +345,6 @@ installAppWithPath() { # $1: path to app to install in $targetDir cleanupAndExit 5 "Team IDs do not match" fi - # macOS versioncheck - minimumOSversion=$(defaults read $appPath/Contents/Info.plist LSMinimumSystemVersion) - if [[ $minimumOSversion =~ '[0-9.]*' ]]; then - printlog "App has LSMinimumSystemVersion: $minimumOSversion" - if ! is-at-least $minimumOSversion $installedOSversion; then - printlog "App requires higher System Version than installed: $installedOSversion" - cleanupAndExit 6 "Installed macOS is too old for this app." - fi - fi - # app versioncheck appNewVersion=$(defaults read $appPath/Contents/Info.plist $versionKey) if [[ -n $appNewVersion && $appversion == $appNewVersion ]]; then @@ -373,6 +363,21 @@ installAppWithPath() { # $1: path to app to install in $targetDir printlog "Downloaded version of $name is $appNewVersion (replacing version $appversion)." fi + # macOS versioncheck + minimumOSversion=$(defaults read $appPath/Contents/Info.plist LSMinimumSystemVersion) + if [[ $minimumOSversion =~ '[0-9.]*' ]]; then + printlog "App has LSMinimumSystemVersion: $minimumOSversion" + if ! is-at-least $minimumOSversion $installedOSversion; then + printlog "App requires higher System Version than installed: $installedOSversion" + message="Cannot install $name, version $appNewVersion, as it is not compatible with the running system version." + if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then + printlog "notifying" + displaynotification "$message" "Error updating $name!" + fi + cleanupAndExit 6 "Installed macOS is too old for this app." + fi + fi + # skip install for DEBUG 1 if [ "$DEBUG" -eq 1 ]; then printlog "DEBUG mode 1 enabled, skipping remove, copy and chown steps" From c3ddd4f8c7d94387a8a658b0b075983a0d6ae635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 7 Jan 2022 19:40:51 +0100 Subject: [PATCH 35/58] Update buildLabel.sh Different set of headers. --- utils/buildLabel.sh | 102 +++++++++++++++++++++++++------------------- 1 file changed, 59 insertions(+), 43 deletions(-) diff --git a/utils/buildLabel.sh b/utils/buildLabel.sh index 6d74380..87e6ded 100755 --- a/utils/buildLabel.sh +++ b/utils/buildLabel.sh @@ -82,6 +82,36 @@ pkgInvestigation() { echo "$packageID" echo "Above is the possible packageIDs that can be used, and the correct one is probably one of those with a version number. More investigation might be needed to figure out correct packageID if several are displayed." } + +dmgInvestigation() { + echo "DMG investigation." + # mount the dmg + echo "Mounting $archiveName" + if ! dmgmount=$(echo "Y"$'\n' | hdiutil attach "$archiveName" -nobrowse -readonly | tail -n 1 | cut -c 54- ); then + echo "Error mounting $archiveName" + exit 3 + fi + echo "Mounted: $dmgmount" + + # check if app og pkg exists on disk image + appPath=$(find "$dmgmount" -name "*.app" -maxdepth 1 -print ) + pkgPath=$(find "$dmgmount" -name "*.pkg" -maxdepth 1 -print ) + + if [[ $appPath != "" ]]; then + echo "App found: $appPath" + appInvestigation + elif [[ $pkgPath != "" ]]; then + echo "PKG found: $pkgPath" + archiveExt="pkgInDmg" + pkgInvestigation + else + echo "Nothing found on DMG." + exit 9 + fi + + hdiutil detach "$dmgmount" +} + appInvestigation() { appName=${appPath##*/} name=${appName%.*} @@ -122,19 +152,22 @@ if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name - echo "result: $downloadOut" echo "Trying all headers…" # that I know of if ! downloadOut="$(curl -fL -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" -H "accept-encoding: gzip, deflate, br" -H "Referrer Policy: strict-origin-when-cross-origin" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "accept-language: en-US,en;q=0.9" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-mode: navigate" "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then - # we are only here if the download failed - echo "error downloading $downloadURL using all headers." - echo "result: $downloadOut" - # Sometimes a server will give some results to the downloaded output - if [[ -n $downloadOut ]]; then - echo "Trying output of this…" - downloadURL="$(echo $downloadOut | tail -1)" - # Last chance for succes on this download - if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then - echo "error downloading $downloadURL using previous output." - echo "result: $downloadOut" - echo "No more tries. Cannot continue." - exit 1 + echo "Trying almost all headers…" # that I know of + if ! downloadOut="$(curl -fL -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" -H "accept-encoding: gzip, deflate, br" -H "upgrade-insecure-requests: 1" -H "sec-fetch-dest: document" -H "sec-gpc: 1" -H "sec-fetch-user: ?1" -H "accept-language: en-US,en;q=0.9" -H "accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" -H "sec-fetch-mode: navigate" "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then + # we are only here if the download failed + echo "error downloading $downloadURL using two different sets of headers." + echo "result: $downloadOut" + # Sometimes a server will give some results to the downloaded output + if [[ -n $downloadOut ]]; then + echo "Trying output of this…" + downloadURL="$(echo $downloadOut | tail -1)" + # Last chance for succes on this download + if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then + echo "error downloading $downloadURL using previous output." + echo "result: $downloadOut" + echo "No more tries. Cannot continue." + exit 1 + fi fi fi fi @@ -171,10 +204,6 @@ echo "name: $name" archiveExt=${archiveName##*.} type=$archiveExt echo "archiveExt: $archiveExt" -identifier=${name:l} # making lower case -identifier=${identifier//\%[0-9a-fA-F][0-9a-fA-F]} # removing certain characters -identifier=${identifier//[,._*@$\(\)\-]} # removing more characters from label name -echo "identifier: $identifier" # Now figuring out the filename extension and handling those situations if [ "$archiveExt" = "pkg" ]; then @@ -183,31 +212,7 @@ if [ "$archiveExt" = "pkg" ]; then pkgInvestigation elif [ "$archiveExt" = "dmg" ]; then echo "Diskimage found" - # mount the dmg - echo "Mounting $archiveName" - if ! dmgmount=$(echo "Y"$'\n' | hdiutil attach "$archiveName" -nobrowse -readonly | tail -n 1 | cut -c 54- ); then - echo "Error mounting $archiveName" - exit 3 - fi - echo "Mounted: $dmgmount" - - # check if app og pkg exists on disk image - appPath=$(find "$dmgmount" -name "*.app" -maxdepth 1 -print ) - pkgPath=$(find "$dmgmount" -name "*.pkg" -maxdepth 1 -print ) - - if [[ $appPath != "" ]]; then - echo "App found: $appPath" - appInvestigation - elif [[ $pkgPath != "" ]]; then - echo "PKG found: $pkgPath" - archiveExt="pkgInDmg" - pkgInvestigation - else - echo "Nothing found on DMG." - exit 9 - fi - - hdiutil detach "$dmgmount" + dmgInvestigation elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then echo "Compressed file found" # unzip the archive @@ -216,6 +221,7 @@ elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then # check if app og pkg exists after expanding appPath=$(find "$tmpDir" -name "*.app" -maxdepth 2 -print ) pkgPath=$(find "$tmpDir" -name "*.pkg" -maxdepth 2 -print ) + archiveName=$(find "$tmpDir" -name "*.dmg" -maxdepth 2 -print ) if [[ $appPath != "" ]]; then echo "App found: $appPath" @@ -223,14 +229,24 @@ elif [ "$archiveExt" = "zip" ] || [ "$archiveExt" = "tbz" ]; then elif [[ $pkgPath != "" ]]; then echo "PKG found: $pkgPath" archiveExt="pkgInZip" + echo "archiveExt: $archiveExt" pkgInvestigation + elif [[ $archiveName != "" ]]; then + echo "Disk image found: $archiveName" + archiveExt="dmgInZip" + echo "archiveExt: $archiveExt" + dmgInvestigation else echo "Nothing found in compressed archive." exit 9 fi - fi +identifier=${name:l} # making lower case +identifier=${identifier//\%[0-9a-fA-F][0-9a-fA-F]} # removing certain characters +identifier=${identifier//[,._*@$\(\)\-]} # removing more characters from label name +echo "identifier: $identifier" + # github-part to figure out if we can find author and repo, to use our github functions for the label if echo "$downloadURL" | grep -i "github.com.*releases/download"; then echo "\n**********\n\nFound GitHub path" From d80c76a4d3721534588cf1b00d15509af2ac9319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 7 Jan 2022 20:41:35 +0100 Subject: [PATCH 36/58] mocha-software and buildLabel.sh 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. --- fragments/{broken => disabled}/mightymike.sh | 0 fragments/disabled/mochakeyboard.sh | 7 +++++++ fragments/disabled/mochatelnet.sh | 7 +++++++ fragments/disabled/mochatn3270.sh | 7 +++++++ fragments/disabled/mochatn3812.sh | 7 +++++++ fragments/disabled/mochatn5250.sh | 7 +++++++ fragments/{broken => disabled}/nanosaur.sh | 0 utils/buildLabel.sh | 9 ++++++++- 8 files changed, 43 insertions(+), 1 deletion(-) rename fragments/{broken => disabled}/mightymike.sh (100%) create mode 100644 fragments/disabled/mochakeyboard.sh create mode 100644 fragments/disabled/mochatelnet.sh create mode 100644 fragments/disabled/mochatn3270.sh create mode 100644 fragments/disabled/mochatn3812.sh create mode 100644 fragments/disabled/mochatn5250.sh rename fragments/{broken => disabled}/nanosaur.sh (100%) diff --git a/fragments/broken/mightymike.sh b/fragments/disabled/mightymike.sh similarity index 100% rename from fragments/broken/mightymike.sh rename to fragments/disabled/mightymike.sh diff --git a/fragments/disabled/mochakeyboard.sh b/fragments/disabled/mochakeyboard.sh new file mode 100644 index 0000000..5f742a5 --- /dev/null +++ b/fragments/disabled/mochakeyboard.sh @@ -0,0 +1,7 @@ +mochakeyboard) + name="Mocha Keyboard" + type="appInDmgInZip" + downloadURL="https://mochasoft.dk/mochakeyboard.dmg.zip" + appNewVersion="" + expectedTeamID="RR9F5EPNVW" + ;; diff --git a/fragments/disabled/mochatelnet.sh b/fragments/disabled/mochatelnet.sh new file mode 100644 index 0000000..5eba112 --- /dev/null +++ b/fragments/disabled/mochatelnet.sh @@ -0,0 +1,7 @@ +mochatelnet) + name="Telnet" + type="appInDmgInZip" + downloadURL="https://mochasoft.dk/telnet.dmg.zip" + appNewVersion="" + expectedTeamID="RR9F5EPNVW" + ;; diff --git a/fragments/disabled/mochatn3270.sh b/fragments/disabled/mochatn3270.sh new file mode 100644 index 0000000..74ce410 --- /dev/null +++ b/fragments/disabled/mochatn3270.sh @@ -0,0 +1,7 @@ +mochatn3270) + name="TN3270" + type="appInDmgInZip" + downloadURL="https://mochasoft.dk/tn3270.dmg.zip" + appNewVersion="" + expectedTeamID="RR9F5EPNVW" + ;; diff --git a/fragments/disabled/mochatn3812.sh b/fragments/disabled/mochatn3812.sh new file mode 100644 index 0000000..54f3884 --- /dev/null +++ b/fragments/disabled/mochatn3812.sh @@ -0,0 +1,7 @@ +mochatn3812) + name="TN3812" + type="appInDmgInZip" + downloadURL="https://mochasoft.dk/tn3812.dmg.zip" + appNewVersion="" + expectedTeamID="Frydendal" + ;; diff --git a/fragments/disabled/mochatn5250.sh b/fragments/disabled/mochatn5250.sh new file mode 100644 index 0000000..ae8ccf2 --- /dev/null +++ b/fragments/disabled/mochatn5250.sh @@ -0,0 +1,7 @@ +mochatn5250) + name="TN5250" + type="appInDmgInZip" + downloadURL="https://mochasoft.dk/tn5250.dmg.zip" + appNewVersion="" + expectedTeamID="RR9F5EPNVW" + ;; diff --git a/fragments/broken/nanosaur.sh b/fragments/disabled/nanosaur.sh similarity index 100% rename from fragments/broken/nanosaur.sh rename to fragments/disabled/nanosaur.sh diff --git a/utils/buildLabel.sh b/utils/buildLabel.sh index 87e6ded..8f96e3c 100755 --- a/utils/buildLabel.sh +++ b/utils/buildLabel.sh @@ -99,10 +99,17 @@ dmgInvestigation() { if [[ $appPath != "" ]]; then echo "App found: $appPath" + if [[ $archiveExt = "dmgInZip" ]]; then + archiveExt="appInDmgInZip" + fi appInvestigation elif [[ $pkgPath != "" ]]; then echo "PKG found: $pkgPath" - archiveExt="pkgInDmg" + if [[ $archiveExt = "dmgInZip" ]]; then + archiveExt="pkgInDmgInZip not supported, yet!" + else + archiveExt="pkgInDmg" + fi pkgInvestigation else echo "Nothing found on DMG." 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 37/58] 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 6a9ffeb1016666aeea8289c1c0c6b69fca6fdc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sat, 8 Jan 2022 20:04:47 +0100 Subject: [PATCH 38/58] Create sdnotary.sh Great app for signing AppleScript and Automator Apps. ``` Installomator/utils/assemble.sh sdnotary DEBUG=0 2022-01-08 20:02:33 sdnotary setting variable from argument DEBUG=0 2022-01-08 20:02:33 sdnotary ################## Start Installomator v. 9.0dev 2022-01-08 20:02:33 sdnotary ################## sdnotary 2022-01-08 20:02:35 sdnotary BLOCKING_PROCESS_ACTION=tell_user 2022-01-08 20:02:35 sdnotary NOTIFY=success 2022-01-08 20:02:35 sdnotary LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-01-08 20:02:35 sdnotary no blocking processes defined, using SD Notary as default 2022-01-08 20:02:35 sdnotary Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Y3LciW3v 2022-01-08 20:02:35 sdnotary App(s) found: /Applications/SD Notary.app 2022-01-08 20:02:35 sdnotary found app at /Applications/SD Notary.app, version 1.4.9 2022-01-08 20:02:35 sdnotary appversion: 1.4.9 2022-01-08 20:02:35 sdnotary Latest version of SD Notary is 1.4.9 2022-01-08 20:02:35 sdnotary There is no newer version available. 2022-01-08 20:02:35 sdnotary Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Y3LciW3v 2022-01-08 20:02:35 sdnotary App not closed, so no reopen. 2022-01-08 20:02:35 sdnotary ################## End Installomator, exit code 0 Installomator/utils/assemble.sh sdnotary DEBUG=0 INSTALL=force 2022-01-08 20:02:55 sdnotary setting variable from argument DEBUG=0 2022-01-08 20:02:55 sdnotary setting variable from argument INSTALL=force 2022-01-08 20:02:55 sdnotary ################## Start Installomator v. 9.0dev 2022-01-08 20:02:55 sdnotary ################## sdnotary 2022-01-08 20:02:57 sdnotary BLOCKING_PROCESS_ACTION=tell_user 2022-01-08 20:02:57 sdnotary NOTIFY=success 2022-01-08 20:02:57 sdnotary LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-01-08 20:02:57 sdnotary no blocking processes defined, using SD Notary as default 2022-01-08 20:02:57 sdnotary Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Pt3uud5W 2022-01-08 20:02:57 sdnotary App(s) found: /Applications/SD Notary.app 2022-01-08 20:02:57 sdnotary found app at /Applications/SD Notary.app, version 1.4.9 2022-01-08 20:02:57 sdnotary appversion: 1.4.9 2022-01-08 20:02:57 sdnotary Using force to install, so not using updateTool. 2022-01-08 20:02:57 sdnotary Latest version of SD Notary is 1.4.9 2022-01-08 20:02:57 sdnotary There is no newer version available. 2022-01-08 20:02:57 sdnotary Downloading https://s3.amazonaws.com/latenightsw.com/SDNotary1.4.9-65.zip to SD Notary.zip 2022-01-08 20:02:58 sdnotary no more blocking processes, continue with update 2022-01-08 20:02:58 sdnotary Installing SD Notary 2022-01-08 20:02:58 sdnotary Unzipping SD Notary.zip 2022-01-08 20:02:58 sdnotary Verifying: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Pt3uud5W/SD Notary.app 2022-01-08 20:02:59 sdnotary Team ID matching: Z7S6X96M3X (expected: Z7S6X96M3X ) 2022-01-08 20:02:59 sdnotary Downloaded version of SD Notary is 1.4.9, same as installed. 2022-01-08 20:02:59 sdnotary Using force to install anyway. 2022-01-08 20:02:59 sdnotary Removing existing /Applications/SD Notary.app 2022-01-08 20:02:59 sdnotary Copy /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Pt3uud5W/SD Notary.app to /Applications 2022-01-08 20:02:59 sdnotary Changing owner to st 2022-01-08 20:02:59 sdnotary Finishing... 2022-01-08 20:03:09 sdnotary App(s) found: /Applications/SD Notary.app 2022-01-08 20:03:09 sdnotary found app at /Applications/SD Notary.app, version 1.4.9 2022-01-08 20:03:09 sdnotary Installed SD Notary, version 1.4.9 2022-01-08 20:03:09 sdnotary notifying 2022-01-08 20:03:09 sdnotary Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.Pt3uud5W 2022-01-08 20:03:09 sdnotary App not closed, so no reopen. 2022-01-08 20:03:09 sdnotary ################## End Installomator, exit code 0 ``` --- fragments/labels/sdnotary.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/sdnotary.sh diff --git a/fragments/labels/sdnotary.sh b/fragments/labels/sdnotary.sh new file mode 100644 index 0000000..7eb7aeb --- /dev/null +++ b/fragments/labels/sdnotary.sh @@ -0,0 +1,7 @@ +sdnotary) + name="SD Notary" + type="zip" + downloadURL=$(curl -fs https://latenightsw.com/sd-notary-notarizing-made-easy/ | grep -io "https://.*/.*\.zip") + appNewVersion=$(echo "$downloadURL" | sed -E 's/.*\/[a-zA-Z]*([0-9.]*)-.*\.zip/\1/g') + expectedTeamID="Z7S6X96M3X" + ;; From 130764696ded3665454f4c8f5f001d68343d8c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 10:05:03 +0100 Subject: [PATCH 39/58] New URL and version But Installomator does not handle regex in the pkgName, so this doesn't work, yet. --- fragments/labels/logitechoptions.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fragments/labels/logitechoptions.sh b/fragments/labels/logitechoptions.sh index d0278d3..bf7c088 100644 --- a/fragments/labels/logitechoptions.sh +++ b/fragments/labels/logitechoptions.sh @@ -1,9 +1,8 @@ logitechoptions) name="Logitech Options" type="pkgInZip" - downloadURL=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}') - #appNewVersion=$(curl -fs -L https://www.logitech.com/en-us/product/options | grep -m 1 -o "https.*zip" | sed 's/\"//' | awk '{print $1}' | sed -E 's/.*_([0-9\.]*)[-\.].*/\1/' ) - #pkgName="LogiMgr Installer ${appNewVersion}.app/Contents/Resources/LogiMgr.pkg" + downloadURL=$(curl -fs https://support.logi.com/api/v2/help_center/en-us/articles.json | tr "," "\n" | grep -A 10 "macOS" | grep -oie "https.*/.*/options.*\.zip") + appNewVersion=$(curl -fs https://support.logi.com/api/v2/help_center/en-us/articles.json | tr "," "\n" | grep -A 10 "macOS" | grep -B 5 -ie "https.*/.*/options.*\.zip" | grep "Software Version" | sed 's/\\u[0-9a-z][0-9a-z][0-9a-z][0-9a-z]//g' | grep -ioe "Software Version.*[0-9.]*" | tr "/" "\n" | grep -oe "[0-9.]*" | head -1) pkgName="LogiMgr Installer [0-9.]*.app/Contents/Resources/LogiMgr.pkg" expectedTeamID="QED4VVPZWA" ;; From 9b47ed2e3f6c5d4425931b626d1ab524a18d0655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 10:42:45 +0100 Subject: [PATCH 40/58] `pkgName` can be searched for. 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. --- CHANGELOG.md | 1 + fragments/functions.sh | 32 ++++++++++++++++++++++++----- fragments/header.sh | 2 +- fragments/labels/logitechoptions.sh | 3 ++- 4 files changed, 31 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f87508..065e838 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). +- `pkgName` can now be searched for. An example is logitechoptions. ## v8.0 diff --git a/fragments/functions.sh b/fragments/functions.sh index f5d5137..7a4664d 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -543,8 +543,19 @@ installPkgInDmg() { archiveName="${filearray[1]}" printlog "found pkg: $archiveName" else - # it is now safe to overwrite archiveName for installFromPKG - archiveName="$dmgmount/$pkgName" + if ls "$tmpDir/$pkgName" ; then + archiveName="$tmpDir/$pkgName" + else + # try searching for pkg + findfiles=$(find "$tmpDir" -iname "$pkgName") + filearray=( ${(f)findfiles} ) + if [[ ${#filearray} -eq 0 ]]; then + cleanupAndExit 20 "couldn't find pkg “$pkgName” in zip $archiveName" + fi + # it is now safe to overwrite archiveName for installFromPKG + archiveName="${filearray[1]}" + printlog "found pkg: $archiveName" + fi fi # installFromPkgs @@ -564,12 +575,23 @@ installPkgInZip() { if [[ ${#filearray} -eq 0 ]]; then cleanupAndExit 20 "couldn't find pkg in zip $archiveName" fi - archiveName="${filearray[1]}" # it is now safe to overwrite archiveName for installFromPKG + archiveName="${filearray[1]}" printlog "found pkg: $archiveName" else - # it is now safe to overwrite archiveName for installFromPKG - archiveName="$tmpDir/$pkgName" + if ls "$tmpDir/$pkgName" ; then + archiveName="$tmpDir/$pkgName" + else + # try searching for pkg + findfiles=$(find "$tmpDir" -iname "$pkgName") + filearray=( ${(f)findfiles} ) + if [[ ${#filearray} -eq 0 ]]; then + cleanupAndExit 20 "couldn't find pkg “$pkgName” in zip $archiveName" + fi + # it is now safe to overwrite archiveName for installFromPKG + archiveName="${filearray[1]}" + printlog "found pkg: $archiveName" + fi fi # installFromPkgs diff --git a/fragments/header.sh b/fragments/header.sh index c41879d..02a6e89 100644 --- a/fragments/header.sh +++ b/fragments/header.sh @@ -190,7 +190,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: diff --git a/fragments/labels/logitechoptions.sh b/fragments/labels/logitechoptions.sh index bf7c088..98bdf6b 100644 --- a/fragments/labels/logitechoptions.sh +++ b/fragments/labels/logitechoptions.sh @@ -3,6 +3,7 @@ logitechoptions) type="pkgInZip" downloadURL=$(curl -fs https://support.logi.com/api/v2/help_center/en-us/articles.json | tr "," "\n" | grep -A 10 "macOS" | grep -oie "https.*/.*/options.*\.zip") appNewVersion=$(curl -fs https://support.logi.com/api/v2/help_center/en-us/articles.json | tr "," "\n" | grep -A 10 "macOS" | grep -B 5 -ie "https.*/.*/options.*\.zip" | grep "Software Version" | sed 's/\\u[0-9a-z][0-9a-z][0-9a-z][0-9a-z]//g' | grep -ioe "Software Version.*[0-9.]*" | tr "/" "\n" | grep -oe "[0-9.]*" | head -1) - pkgName="LogiMgr Installer [0-9.]*.app/Contents/Resources/LogiMgr.pkg" + #pkgName="LogiMgr Installer "*".app/Contents/Resources/LogiMgr.pkg" + pkgName=LogiMgr.pkg expectedTeamID="QED4VVPZWA" ;; 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 41/58] 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 264dc99a97db8b831164808d9f71d0481201068f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 10:47:30 +0100 Subject: [PATCH 42/58] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f87508..6502e02 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). +- `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. ## 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 43/58] 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 44/58] 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 45/58] 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 46/58] 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 47/58] 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 48/58] 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" ;; From 4e21a99fd7894a8bf3453116f276c3a3b2ec451d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Sun, 9 Jan 2022 21:41:32 +0100 Subject: [PATCH 49/58] Update flux.sh --- fragments/labels/flux.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fragments/labels/flux.sh b/fragments/labels/flux.sh index af9338f..f374992 100644 --- a/fragments/labels/flux.sh +++ b/fragments/labels/flux.sh @@ -3,4 +3,5 @@ flux) type="zip" downloadURL="https://justgetflux.com/mac/Flux.zip" expectedTeamID="VZKSA7H9J9" - ;; \ No newline at end of file + ;; + From 3c7d5702492eb4f3f458cd1875c2a63413ab3480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 10 Jan 2022 13:07:39 +0100 Subject: [PATCH 50/58] Update brave.sh --- fragments/labels/brave.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/brave.sh b/fragments/labels/brave.sh index 6e16d6d..ef9df31 100644 --- a/fragments/labels/brave.sh +++ b/fragments/labels/brave.sh @@ -3,12 +3,12 @@ brave) type="dmg" if [[ $(arch) != "i386" ]]; then printlog "Architecture: arm64 (not i386)" - downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osxarm64/release | grep -i "^location" | awk '{print $2}') + downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osxarm64/release | grep -i "^location" | sed -E 's/.*(https.*\.dmg).*/\1/g') appNewVersion="$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2)" #appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable-arm64/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" else printlog "Architecture: i386" - downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osx/release | grep -i "^location" | awk '{print $2}') + downloadURL=$(curl -fsIL https://laptop-updates.brave.com/latest/osx/release | grep -i "^location" | sed -E 's/.*(https.*\.dmg).*/\1/g') appNewVersion="$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:version' 2>/dev/null | cut -d '"' -f 2)" #appNewVersion="96.$(curl -fsL "https://updates.bravesoftware.com/sparkle/Brave-Browser/stable/appcast.xml" | xpath '//rss/channel/item[last()]/enclosure/@sparkle:shortVersionString' 2>/dev/null | cut -d '"' -f 2 | cut -d "." -f1-3)" fi From 27fd0b0347868a1dc153444e2c18fbb520cdedb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=BChler?= <48823479+adibue@users.noreply.github.com> Date: Mon, 10 Jan 2022 17:44:28 +0100 Subject: [PATCH 51/58] Update libreoffice.sh Added `downloadURL` for Apple Silicon. Also added `blockingProcesses`, so open documents are not quit anymore while updating. --- fragments/labels/libreoffice.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fragments/labels/libreoffice.sh b/fragments/labels/libreoffice.sh index 88e3225..2befca5 100644 --- a/fragments/labels/libreoffice.sh +++ b/fragments/labels/libreoffice.sh @@ -1,8 +1,12 @@ libreoffice) - # credit: Micah Lee (@micahflee) name="LibreOffice" type="dmg" - downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/x86_64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_x86-64.dmg" + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/aarch64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_aarch64.dmg" + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://download.documentfoundation.org/libreoffice/stable/$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)/mac/x86_64/LibreOffice_$(curl -s https://www.libreoffice.org/download/download/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)_MacOS_x86-64.dmg" + fi appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g' ) expectedTeamID="7P5S3ZLCN7" + blockingProcesses=( soffice ) ;; From 22129c7220e21bb9bdbca140707b49ebd4be0b30 Mon Sep 17 00:00:00 2001 From: fleish <2106430+fleish@users.noreply.github.com> Date: Tue, 11 Jan 2022 09:41:15 -0800 Subject: [PATCH 52/58] Update gpgsuite blockingProcesses for GPG Keychain --- fragments/labels/gpgsuite.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/fragments/labels/gpgsuite.sh b/fragments/labels/gpgsuite.sh index 60a8953..d2066bb 100644 --- a/fragments/labels/gpgsuite.sh +++ b/fragments/labels/gpgsuite.sh @@ -5,4 +5,5 @@ gpgsuite) pkgName="Install.pkg" downloadURL=$(curl -s https://gpgtools.org/ | grep https://releases.gpgtools.org/GPG_Suite- | grep Download | cut -d'"' -f4) expectedTeamID="PKV8ZPD836" + blockingProcesses=( "GPG Keychain" ) ;; From 8532baf8a58c2d0fe12727d34efd1b5f66342d15 Mon Sep 17 00:00:00 2001 From: fleish <2106430+fleish@users.noreply.github.com> Date: Tue, 11 Jan 2022 09:46:07 -0800 Subject: [PATCH 53/58] Add DaisyDisk label --- daisydisk.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 daisydisk.sh diff --git a/daisydisk.sh b/daisydisk.sh new file mode 100644 index 0000000..638e61f --- /dev/null +++ b/daisydisk.sh @@ -0,0 +1,7 @@ +daisydisk) + name="DaisyDisk" + type="zip" + downloadURL="https://daisydiskapp.com/downloads/DaisyDisk.zip" + appNewVersion=$( curl -fs 'https://daisydiskapp.com/downloads/appcastReleaseNotes.php?appEdition=Standard' | grep Version | head -1 | cut -d \> -f 3 | cut -d \< -f 1 | awk '{print $2}' ) + expectedTeamID="4CBU3JHV97" + ;; From 59c759010764123aa79b28cdef938eef64c638a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=BChler?= <48823479+adibue@users.noreply.github.com> Date: Wed, 12 Jan 2022 18:22:36 +0100 Subject: [PATCH 54/58] Fixed 'appNewVersion' for 'docker' 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 ``` --- fragments/labels/docker.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fragments/labels/docker.sh b/fragments/labels/docker.sh index 4fc1e28..5dd5e4e 100644 --- a/fragments/labels/docker.sh +++ b/fragments/labels/docker.sh @@ -1,13 +1,12 @@ docker) - # credit: @securitygeneration name="Docker" type="dmg" - #downloadURL="https://download.docker.com/mac/stable/Docker.dmg" if [[ $(arch) == arm64 ]]; then downloadURL="https://desktop.docker.com/mac/stable/arm64/Docker.dmg" + appNewVersion=$( curl -fs "https://desktop.docker.com/mac/main/arm64/appcast.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2 ) elif [[ $(arch) == i386 ]]; then downloadURL="https://desktop.docker.com/mac/stable/amd64/Docker.dmg" + appNewVersion=$( curl -fs "https://desktop.docker.com/mac/main/amd64/appcast.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2 ) fi - appNewVersion=$(curl -ifs https://docs.docker.com/docker-for-mac/release-notes/ | grep ">Docker Desktop Community" | head -1 | sed -n -e 's/^.*Community //p' | cut -d '<' -f1) expectedTeamID="9BNSXJN65R" ;; From d2381d20532e3f885ee8e5437d3f8c3da9473110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=BChler?= <48823479+adibue@users.noreply.github.com> Date: Fri, 14 Jan 2022 09:33:42 +0100 Subject: [PATCH 55/58] Changed xpath to use 'last()' 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. --- fragments/labels/docker.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fragments/labels/docker.sh b/fragments/labels/docker.sh index 5dd5e4e..1fd1b75 100644 --- a/fragments/labels/docker.sh +++ b/fragments/labels/docker.sh @@ -3,10 +3,10 @@ docker) type="dmg" if [[ $(arch) == arm64 ]]; then downloadURL="https://desktop.docker.com/mac/stable/arm64/Docker.dmg" - appNewVersion=$( curl -fs "https://desktop.docker.com/mac/main/arm64/appcast.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2 ) + appNewVersion=$( curl -fs "https://desktop.docker.com/mac/main/arm64/appcast.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[last()]' 2>/dev/null | cut -d '"' -f2 ) elif [[ $(arch) == i386 ]]; then downloadURL="https://desktop.docker.com/mac/stable/amd64/Docker.dmg" - appNewVersion=$( curl -fs "https://desktop.docker.com/mac/main/amd64/appcast.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f2 ) + appNewVersion=$( curl -fs "https://desktop.docker.com/mac/main/amd64/appcast.xml" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[last()]' 2>/dev/null | cut -d '"' -f2 ) fi expectedTeamID="9BNSXJN65R" ;; From 0916d618b622312f319528b55c55d23054a081c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=BChler?= <48823479+adibue@users.noreply.github.com> Date: Fri, 14 Jan 2022 14:54:22 +0100 Subject: [PATCH 56/58] Added downloadURL for ARM Added Download URL to the Apple Silicon DMG. --- fragments/labels/wireshark.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fragments/labels/wireshark.sh b/fragments/labels/wireshark.sh index 3c4dafb..19725b8 100644 --- a/fragments/labels/wireshark.sh +++ b/fragments/labels/wireshark.sh @@ -1,7 +1,11 @@ wireshark) name="Wireshark" type="dmg" - downloadURL="https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Intel%2064.dmg" + if [[ $(arch) == i386 ]]; then + downloadURL="https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Intel%2064.dmg" + elif [[ $(arch) == arm64 ]]; then + downloadURL="https://1.as.dl.wireshark.org/osx/Wireshark%20Latest%20Arm%2064.dmg" + fi appNewVersion=$(curl -fs https://www.wireshark.org/download.html | grep "Stable Release" | grep -o "(.*.)" | cut -f2 | head -1 | awk -F '[()]' '{print $2}') expectedTeamID="7Z6EMTD2C6" ;; From d470867c10f4b8dca076704d83d81ae46d4f2d81 Mon Sep 17 00:00:00 2001 From: fleish <2106430+fleish@users.noreply.github.com> Date: Fri, 14 Jan 2022 11:55:02 -0800 Subject: [PATCH 57/58] Fix authydesktop downloadURL Checks for redirect_url and replaces space to be urlencoded --- fragments/labels/authydesktop.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/labels/authydesktop.sh b/fragments/labels/authydesktop.sh index 9051669..07b57d5 100644 --- a/fragments/labels/authydesktop.sh +++ b/fragments/labels/authydesktop.sh @@ -1,7 +1,7 @@ authydesktop) name="Authy Desktop" type="dmg" - downloadURL="https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy" + downloadURL=$(curl -s -w '%{redirect_url}' -o /dev/null "https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy" | sed 's/\ /%20/g') appNewVersion="$(curl -sfL --output /dev/null -r 0-0 "${downloadURL}" --remote-header-name --remote-name -w "%{url_effective}\n" | grep -o -E '([a-zA-Z0-9\_.%-]*)\.(dmg|pkg|zip|tbz)$' | sed -E 's/.*-([0-9.]*)\.dmg/\1/g')" expectedTeamID="9EVH78F4V4" ;; From c7eeaeee19b7c601b7481d21590b82ff4966e215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Fri, 14 Jan 2022 21:26:03 +0100 Subject: [PATCH 58/58] Create lowprofile.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Installing app with force to replace currently installed version: ``` Installomator/utils/assemble.sh lowprofile DEBUG=0 INSTALL=force 2022-01-14 21:24:43 lowprofile setting variable from argument DEBUG=0 2022-01-14 21:24:43 lowprofile setting variable from argument INSTALL=force 2022-01-14 21:24:43 lowprofile ################## Start Installomator v. 9.0dev 2022-01-14 21:24:43 lowprofile ################## lowprofile 2022-01-14 21:24:43 lowprofile BLOCKING_PROCESS_ACTION=tell_user 2022-01-14 21:24:43 lowprofile NOTIFY=success 2022-01-14 21:24:43 lowprofile LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns 2022-01-14 21:24:43 lowprofile no blocking processes defined, using Low Profile as default 2022-01-14 21:24:43 lowprofile Changing directory to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.sTvDinhT 2022-01-14 21:24:43 lowprofile App(s) found: /Applications/Low Profile.app 2022-01-14 21:24:43 lowprofile found app at /Applications/Low Profile.app, version 2.0 2022-01-14 21:24:43 lowprofile appversion: 2.0 2022-01-14 21:24:43 lowprofile 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-01-14 21:24:43 lowprofile Latest version of Low Profile is 2.0 2022-01-14 21:24:43 lowprofile There is no newer version available. 2022-01-14 21:24:43 lowprofile Downloading https://github.com/ninxsoft/LowProfile/releases/download/v2.0/Low.Profile.2.0.dmg to Low Profile.dmg 2022-01-14 21:24:45 lowprofile no more blocking processes, continue with update 2022-01-14 21:24:45 lowprofile Installing Low Profile 2022-01-14 21:24:45 lowprofile Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.sTvDinhT/Low Profile.dmg 2022-01-14 21:24:48 lowprofile Mounted: /Volumes/Low Profile 1 2022-01-14 21:24:48 lowprofile Verifying: /Volumes/Low Profile 1/Low Profile.app 2022-01-14 21:24:48 lowprofile Team ID matching: 7K3HVCLV7Z (expected: 7K3HVCLV7Z ) 2022-01-14 21:24:48 lowprofile Downloaded version of Low Profile is 2.0, same as installed. 2022-01-14 21:24:48 lowprofile Using force to install anyway. 2022-01-14 21:24:48 lowprofile App has LSMinimumSystemVersion: 12.0 2022-01-14 21:24:48 lowprofile Removing existing /Applications/Low Profile.app 2022-01-14 21:24:48 lowprofile Copy /Volumes/Low Profile 1/Low Profile.app to /Applications 2022-01-14 21:24:48 lowprofile Changing owner to st 2022-01-14 21:24:48 lowprofile Finishing... 2022-01-14 21:24:58 lowprofile App(s) found: /Applications/Low Profile.app 2022-01-14 21:24:58 lowprofile found app at /Applications/Low Profile.app, version 2.0 2022-01-14 21:24:58 lowprofile Installed Low Profile, version 2.0 2022-01-14 21:24:58 lowprofile notifying 2022-01-14 21:24:58 lowprofile Deleting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.sTvDinhT 2022-01-14 21:24:58 lowprofile Unmounting /Volumes/Low Profile 1 "disk5" ejected. 2022-01-14 21:24:58 lowprofile App not closed, so no reopen. 2022-01-14 21:24:58 lowprofile ################## End Installomator, exit code 0 ``` --- fragments/labels/lowprofile.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fragments/labels/lowprofile.sh diff --git a/fragments/labels/lowprofile.sh b/fragments/labels/lowprofile.sh new file mode 100644 index 0000000..7eab56e --- /dev/null +++ b/fragments/labels/lowprofile.sh @@ -0,0 +1,7 @@ +lowprofile) + name="Low Profile" + type="dmg" + downloadURL="$(downloadURLFromGit ninxsoft LowProfile)" + appNewVersion="$(versionFromGit ninxsoft LowProfile)" + expectedTeamID="7K3HVCLV7Z" + ;;