From 4467f2ce4606af91feaf4561d924ce21f4aa2d06 Mon Sep 17 00:00:00 2001 From: Takanori TANIGUCHI Date: Sat, 27 Aug 2022 10:50:22 +0900 Subject: [PATCH 1/7] Fix curl switch for libreoffice and some change --- Installomator.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Installomator.sh b/Installomator.sh index 0c689d4..823553b 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -7,7 +7,7 @@ label="" # if no label is sent to the script, this will be used # 2020-2021 Installomator # # inspired by the download scripts from William Smith and Sander Schram -# +# # Contributers: # Armin Briegel - @scriptingosx # Isaac Ordonez - @issacatmann @@ -23,7 +23,7 @@ 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 the 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 @@ -184,7 +184,7 @@ IGNORE_DND_APPS="" # How we get version number from app. Possible values: # - CFBundleShortVersionString # - CFBundleVersion -# Not all software titles uses fields the same. +# Not all software titles uses fields the same. # See Opera label. # # - appCustomVersion(){}: (optional function) @@ -2258,7 +2258,7 @@ egnytewebedit) appName="Egnyte WebEdit.app" blockingProcesses=( NONE ) ;; - + element) name="Element" type="dmg" @@ -2505,7 +2505,7 @@ flux) downloadURL="https://justgetflux.com/mac/Flux.zip" expectedTeamID="VZKSA7H9J9" ;; - + flycut) name="Flycut" type="zip" @@ -2610,7 +2610,7 @@ googledrivefilestream) packageID="com.google.drivefs.arm64" elif [[ $(arch) == "i386" ]]; then packageID="com.google.drivefs.x86_64" - fi + fi downloadURL="https://dl.google.com/drive-file-stream/GoogleDriveFileStream.dmg" # downloadURL="https://dl.google.com/drive-file-stream/GoogleDrive.dmg" blockingProcesses=( "Google Docs" "Google Drive" "Google Sheets" "Google Slides" ) appName="Google Drive.app" @@ -3159,11 +3159,11 @@ libreoffice) name="LibreOffice" type="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" + arch_type="aarch64" fi - appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g' ) + libreoffice_latest_version="$(curl -Ls https://www.libreoffice.org/download/download-libreoffice/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)" + downloadURL="https://download.documentfoundation.org/libreoffice/stable/${libreoffice_latest_version}/mac/${arch_type:-x86_64}/LibreOffice_${libreoffice_latest_version}_MacOS_${arch_type:-x86-64}.dmg" + appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g') expectedTeamID="7P5S3ZLCN7" blockingProcesses=( soffice ) ;; @@ -3181,7 +3181,7 @@ linear) appName="Linear.app" blockingProcesses=( "Linear" ) ;; - + logioptions|\ logitechoptions) name="Logi Options" @@ -4385,7 +4385,7 @@ secretive) appNewVersion=$(versionFromGit maxgoedjen secretive) expectedTeamID="Z72PRUAWF6" ;; - + sequelpro) name="Sequel Pro" type="dmg" From 8127c30c5ed177e978408facda7feea68e8950c9 Mon Sep 17 00:00:00 2001 From: Takanori TANIGUCHI Date: Sat, 27 Aug 2022 22:46:30 +0900 Subject: [PATCH 2/7] Fix downloadURLFromGit() returns sigle line. --- Installomator.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installomator.sh b/Installomator.sh index 823553b..1d02fdf 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -472,7 +472,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name if [ -z "$downloadURL" ]; then cleanupAndExit 9 "could not retrieve download URL for $gitusername/$gitreponame" ERROR else - echo "$downloadURL" + echo "$downloadURL" | head -1 return 0 fi } From ab6aedc4600acb26637cbf48bda23f9acccfc872 Mon Sep 17 00:00:00 2001 From: Takanori TANIGUCHI Date: Sun, 28 Aug 2022 09:44:30 +0900 Subject: [PATCH 3/7] Fix downloadURLFromGit() --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index a14c406..8ee5b66 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -168,7 +168,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name if [ -z "$downloadURL" ]; then cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR else - echo "$downloadURL" + echo "$downloadURL" | head -1 return 0 fi } From 6876114fdf5c9c476fa444e13544c241cd0c9498 Mon Sep 17 00:00:00 2001 From: Takanori TANIGUCHI Date: Sun, 28 Aug 2022 09:45:14 +0900 Subject: [PATCH 4/7] Fix libreoffice download url --- fragments/labels/libreoffice.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fragments/labels/libreoffice.sh b/fragments/labels/libreoffice.sh index 2befca5..c8fab45 100644 --- a/fragments/labels/libreoffice.sh +++ b/fragments/labels/libreoffice.sh @@ -2,11 +2,11 @@ libreoffice) name="LibreOffice" type="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" + arch_type="aarch64" fi - appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g' ) + libreoffice_latest_version="$(curl -Ls https://www.libreoffice.org/download/download-libreoffice/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)" + downloadURL="https://download.documentfoundation.org/libreoffice/stable/${libreoffice_latest_version}/mac/${arch_type:-x86_64}/LibreOffice_${libreoffice_latest_version}_MacOS_${arch_type:-x86-64}.dmg" + appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g') expectedTeamID="7P5S3ZLCN7" blockingProcesses=( soffice ) ;; From 4a60dcb01704c3e0dacace66a69ed14d7e797615 Mon Sep 17 00:00:00 2001 From: Takanori TANIGUCHI Date: Sun, 28 Aug 2022 09:57:18 +0900 Subject: [PATCH 5/7] revert --- Installomator.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Installomator.sh b/Installomator.sh index 1d02fdf..0c689d4 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -7,7 +7,7 @@ label="" # if no label is sent to the script, this will be used # 2020-2021 Installomator # # inspired by the download scripts from William Smith and Sander Schram -# +# # Contributers: # Armin Briegel - @scriptingosx # Isaac Ordonez - @issacatmann @@ -23,7 +23,7 @@ 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 the 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 @@ -184,7 +184,7 @@ IGNORE_DND_APPS="" # How we get version number from app. Possible values: # - CFBundleShortVersionString # - CFBundleVersion -# Not all software titles uses fields the same. +# Not all software titles uses fields the same. # See Opera label. # # - appCustomVersion(){}: (optional function) @@ -472,7 +472,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name if [ -z "$downloadURL" ]; then cleanupAndExit 9 "could not retrieve download URL for $gitusername/$gitreponame" ERROR else - echo "$downloadURL" | head -1 + echo "$downloadURL" return 0 fi } @@ -2258,7 +2258,7 @@ egnytewebedit) appName="Egnyte WebEdit.app" blockingProcesses=( NONE ) ;; - + element) name="Element" type="dmg" @@ -2505,7 +2505,7 @@ flux) downloadURL="https://justgetflux.com/mac/Flux.zip" expectedTeamID="VZKSA7H9J9" ;; - + flycut) name="Flycut" type="zip" @@ -2610,7 +2610,7 @@ googledrivefilestream) packageID="com.google.drivefs.arm64" elif [[ $(arch) == "i386" ]]; then packageID="com.google.drivefs.x86_64" - fi + fi downloadURL="https://dl.google.com/drive-file-stream/GoogleDriveFileStream.dmg" # downloadURL="https://dl.google.com/drive-file-stream/GoogleDrive.dmg" blockingProcesses=( "Google Docs" "Google Drive" "Google Sheets" "Google Slides" ) appName="Google Drive.app" @@ -3159,11 +3159,11 @@ libreoffice) name="LibreOffice" type="dmg" if [[ $(arch) == "arm64" ]]; then - arch_type="aarch64" + 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 - libreoffice_latest_version="$(curl -Ls https://www.libreoffice.org/download/download-libreoffice/ | grep dl_version_number | head -n 1 | cut -d'>' -f3 | cut -d'<' -f1)" - downloadURL="https://download.documentfoundation.org/libreoffice/stable/${libreoffice_latest_version}/mac/${arch_type:-x86_64}/LibreOffice_${libreoffice_latest_version}_MacOS_${arch_type:-x86-64}.dmg" - appNewVersion=$(echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g') + appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)_.*/\1/g' ) expectedTeamID="7P5S3ZLCN7" blockingProcesses=( soffice ) ;; @@ -3181,7 +3181,7 @@ linear) appName="Linear.app" blockingProcesses=( "Linear" ) ;; - + logioptions|\ logitechoptions) name="Logi Options" @@ -4385,7 +4385,7 @@ secretive) appNewVersion=$(versionFromGit maxgoedjen secretive) expectedTeamID="Z72PRUAWF6" ;; - + sequelpro) name="Sequel Pro" type="dmg" From 32721128f6ad1376811718a531bb20a946cef2a9 Mon Sep 17 00:00:00 2001 From: Takanori TANIGUCHI Date: Tue, 30 Aug 2022 09:48:33 +0900 Subject: [PATCH 6/7] Duplicate #659 --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index 8ee5b66..a14c406 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -168,7 +168,7 @@ downloadURLFromGit() { # $1 git user name, $2 git repo name if [ -z "$downloadURL" ]; then cleanupAndExit 14 "could not retrieve download URL for $gitusername/$gitreponame" ERROR else - echo "$downloadURL" | head -1 + echo "$downloadURL" return 0 fi } From 6556cfd7d44fe03a6d4ec6ce4073364c6d24706f Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Fri, 2 Sep 2022 12:51:00 +0200 Subject: [PATCH 7/7] fixed typo --- fragments/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/functions.sh b/fragments/functions.sh index a14c406..bd21f87 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -985,7 +985,7 @@ updateDialog() { fi # when to cmdfile is set, do nothing - if [[ $$cmd_file == "" ]]; then + if [[ $cmd_file == "" ]]; then return fi