From 1bf4ea03ec53df6cc9c3da3af10fda72ae56d867 Mon Sep 17 00:00:00 2001 From: Armin Briegel <1933192+scriptingosx@users.noreply.github.com> Date: Thu, 29 Oct 2020 13:57:32 +0100 Subject: [PATCH] added qgis and fixed some logic in installFromDMG --- CHANGELOG.md | 4 +++- Installomator.sh | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a61be53..ca2ddc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## v0.5 - 2020- -- +- when Installomator cannot find an app in a dmg with the given appName it will now use the first .app in the root dir. This is for applications which contain the version number in the application name. Note: this might lead to multiple versions of the app in the /Applications directory. You will have to find a different means to clean these up when necessary ## v0.4 - 2020-10-19 @@ -21,6 +21,7 @@ - improved logging in some statements - several more minor improvements + ## v0.2 - 2020-06-09 - many fixes for broken URLs and other bugs @@ -30,4 +31,5 @@ improved logging - several new applications: count increased from 62 in 0.1 to 87 in 0.2 + ## v0.1 - 2020-05-12 diff --git a/Installomator.sh b/Installomator.sh index 9d7a9a4..5ddee70 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -377,10 +377,11 @@ mountDMG() { installFromDMG() { mountDMG - applicationPath="$dmgmount/$appname" - if [[ -d $applicationPath ]]; then + applicationPath="$dmgmount/$appName" + printlog "looking for app: $applicationPath" + if [[ ! -d $applicationPath ]]; then # find first file ending with 'app' - findfiles=$(find "$dmgmount" -iname "*.app" -maxdepth 1 ) + findfiles=$(find "$dmgmount" -iname "*.app" -maxdepth 1 -mindepth 1 ) filearray=( ${(f)findfiles} ) if [[ ${#filearray} -eq 0 ]]; then cleanupAndExit 21 "couldn't find app in dmg $archiveName" @@ -467,7 +468,7 @@ installPkgInDmg() { # locate pkg in dmg if [[ -z $pkgName ]]; then # find first file ending with 'pkg' - findfiles=$(find "$dmgmount" -iname "*.pkg" -maxdepth 1 ) + findfiles=$(find "$dmgmount" -iname "*.pkg" -maxdepth 1 -mindepth 1 ) filearray=( ${(f)findfiles} ) if [[ ${#filearray} -eq 0 ]]; then cleanupAndExit 20 "couldn't find pkg in dmg $archiveName" @@ -1334,7 +1335,13 @@ gimp) downloadURL=https://$(curl -s -L "https://www.gimp.org/downloads/" | grep -Eio 'download.gimp.org/mirror/pub/gimp/v.*/osx/(.*).dmg') expectedTeamID="T25BQ8HSJF" ;; - +qgis-macos-pr) + # credit: Rob Smithers (@SmithersJr on MacAdmins Slack) + name="QGIS" + type="dmg" + downloadURL="https://qgis.org/downloads/macos/qgis-macos-pr.dmg" + expectedTeamID="4F7N4UDA22" + ;; # MARK: add new labels above here