diff --git a/CHANGELOG.md b/CHANGELOG.md index a1dfcca..d00c624 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,8 @@ - script is now assembled from fragments. This helps avoid merging conflicts on git and allows the core team to work on the script logic while also accepting new labels. See the "Assemble Script ReadMe" for details. - Change in finding installed apps. We now look in /Applications and /Applications/Utilities first. If not found there, we use spotligt to find it. (We discovered a problem when a user has Parallels Windows installed with Microsoft Edge in it. Then Installomator wanted to update the app all the time, becaus spotligt found that Windows version of the app that Parallels created.) -- Added bunch of new labels -- Renamed `buildCaseStatement.sh` to `buildLabel.sh` and improved it a lot. It is a great start when figuring out how to create a new label for an app, or a piece of software. +- Added bunch of new labels, and improved others. +- Renamed `buildCaseStatement.sh` to `buildLabel.sh` and improved it a lot. It is a great start when figuring out how to create a new label for an app, or a piece of software. Look at the tutorials in our wiki. - Mosyle changed their app name from Business to Self-Service ## v0.6 - 2021-07-14 diff --git a/Labels.txt b/Labels.txt index 6ef24e0..44bf33e 100644 --- a/Labels.txt +++ b/Labels.txt @@ -30,6 +30,7 @@ asana atext atom audacity +authydesktop autodmg autopkgr aviatrix @@ -238,6 +239,7 @@ ringcentralmeetings ringcentralphone rocket rocketchat +rodeconnect royaltsx rstudio santa @@ -316,6 +318,7 @@ xink xquartz yubikeymanagerqt zappy +zeplin zohoworkdrive zoom zoomclient diff --git a/README.md b/README.md index 8bb2b17..6a7b0e1 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Installomator +__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the fragmented files, not the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten.__ + _The one installer script to rule them all._ ![](https://img.shields.io/github/v/release/scriptingosx/Installomator) ![](https://img.shields.io/github/downloads/scriptingosx/Installomator/latest/total) ![](https://img.shields.io/badge/macOS-10.14%2B-success) ![](https://img.shields.io/github/license/scriptingosx/Installomator) -This script is in the "we find it useful, it is working for us" stage. +This script is in the “we find it useful, it is working for us” stage. Your production and deployment environment will be different, please test thoroughly before rolling it out to your production. @@ -18,6 +20,10 @@ Do not create an issue just when you have a questions, but do file an issue or p If you have added a new label, then please file a pull request. (and Thank you!) +__Please note, that if you are contributing to this project with new labels or other suggestions in PRs, please put your changes in the fragmented files, not the full `Installomator.sh` script. The full script is now a build of the fragments, and will be overwritten.__ + +We try to keep the script as short as possible, and with more than 300 labels, we can save 300 lines in the script, if we do not have credit lines on each of these. So we are thankful for your contribution, but we will be removing these lines in the coming releases. + ## More reading There are a few interesting post on Installomator on my weblog: diff --git a/fragments/disabled/parallels.sh b/fragments/disabled/parallels.sh new file mode 100644 index 0000000..9d7dd46 --- /dev/null +++ b/fragments/disabled/parallels.sh @@ -0,0 +1,8 @@ +parallels) + # This downloads an installer app, so not really useful here + name="Parallels Desktop" + type="dmg" + downloadURL="https://parallels.com/directdownload/pd15/" + appNewVersion=$(curl -fsIL "${downloadURL}" | grep -i ^location | tail -1 | cut -d "/" -f6) + expectedTeamID="4C6364ACXT" + ;; diff --git a/fragments/header.sh b/fragments/header.sh index 04a2ed1..b483c0b 100644 --- a/fragments/header.sh +++ b/fragments/header.sh @@ -68,7 +68,9 @@ LOGO=appstore # - mosyleb Mosyle Business # - mosylem Mosyle Manager (Education) # - addigy Addigy -# path can also be set in the command call, and if file exists, it will be used, like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"' (spaces are escaped). +# path can also be set in the command call, and if file exists, it will be used. +# Like 'LOGO="/System/Applications/App\ Store.app/Contents/Resources/AppIcon.icns"' +# (spaces have to be escaped). # install behavior diff --git a/fragments/labels/authydesktop.sh b/fragments/labels/authydesktop.sh new file mode 100644 index 0000000..9051669 --- /dev/null +++ b/fragments/labels/authydesktop.sh @@ -0,0 +1,7 @@ +authydesktop) + name="Authy Desktop" + type="dmg" + downloadURL="https://electron.authy.com/download?channel=stable&arch=x64&platform=darwin&version=latest&product=authy" + 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" + ;; diff --git a/fragments/labels/figma.sh b/fragments/labels/figma.sh index 5ebaaf6..ff49a05 100644 --- a/fragments/labels/figma.sh +++ b/fragments/labels/figma.sh @@ -1,6 +1,10 @@ figma) name="Figma" type="zip" - downloadURL="https://desktop.figma.com/mac/Figma.zip" + if [[ $(arch) == "arm64" ]]; then + downloadURL="https://desktop.figma.com/mac-arm/Figma.zip" + elif [[ $(arch) == "i386" ]]; then + downloadURL="https://desktop.figma.com/mac/Figma.zip" + fi expectedTeamID="T8RA8NE3B7" ;; diff --git a/fragments/labels/microsoftofficebusinesspro.sh b/fragments/labels/microsoftofficebusinesspro.sh index f0c2199..48454f8 100644 --- a/fragments/labels/microsoftofficebusinesspro.sh +++ b/fragments/labels/microsoftofficebusinesspro.sh @@ -2,6 +2,7 @@ microsoftofficebusinesspro) name="MicrosoftOfficeBusinessPro" type="pkg" downloadURL="https://go.microsoft.com/fwlink/?linkid=2009112" + appNewVersion=$(curl -fsIL "$downloadURL" | grep -i location: | grep -o "/Microsoft_.*pkg" | cut -d "_" -f 3) expectedTeamID="UBF8T346G9" # using MS PowerPoint as the 'stand-in' for the entire suite appName="Microsoft PowerPoint.app" diff --git a/fragments/labels/montereyblocker.sh b/fragments/labels/montereyblocker.sh new file mode 100644 index 0000000..4429d42 --- /dev/null +++ b/fragments/labels/montereyblocker.sh @@ -0,0 +1,8 @@ +montereyblocker) + name="montereyblocker" + type="pkg" + packageID="dk.envo-it.montereyblocker" + downloadURL=$(downloadURLFromGit Theile montereyblocker ) + appNewVersion=$(versionFromGit Theile montereyblocker ) + expectedTeamID="FXW6QXBFW5" + ;; diff --git a/fragments/labels/rodeconnect.sh b/fragments/labels/rodeconnect.sh new file mode 100644 index 0000000..42c904f --- /dev/null +++ b/fragments/labels/rodeconnect.sh @@ -0,0 +1,8 @@ +rodeconnect) + name="RODE Connect" + type="pkgInZip" + #packageID="com.rodeconnect.installer" #Versioned wrong as 0 in 1.1.0 pkg + downloadURL="https://cdn1.rode.com/rodeconnect_installer_mac.zip" + appNewVersion="$(curl -fs https://rode.com/software/rode-connect | grep -i -o ">Current version .*<" | cut -d " " -f4)" + expectedTeamID="Z9T72PWTJA" + ;; diff --git a/fragments/labels/slack.sh b/fragments/labels/slack.sh index 4a73dba..18e7350 100644 --- a/fragments/labels/slack.sh +++ b/fragments/labels/slack.sh @@ -2,6 +2,6 @@ slack) name="Slack" type="dmg" downloadURL="https://slack.com/ssb/download-osx-universal" # Universal - appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | awk '{print $2}' | tr -d '\r\n' | sed -E 's/.*macos\/([0-9.]*)\/.*/\1/g' ) + appNewVersion=$( curl -fsIL "${downloadURL}" | grep -i "^location" | cut -d "/" -f6 ) expectedTeamID="BQR82RBBHL" ;; diff --git a/fragments/labels/zeplin.sh b/fragments/labels/zeplin.sh new file mode 100644 index 0000000..b2a80e6 --- /dev/null +++ b/fragments/labels/zeplin.sh @@ -0,0 +1,7 @@ +zeplin) + name="Zeplin" + type="zip" + downloadURL="https://zpl.io/download-mac" + appNewVersion="$(curl -fs "https://api.appcenter.ms/v0.1/public/sparkle/apps/8926efff-e734-b6d3-03d0-9f41d90c34fc" | xpath '(//rss/channel/item/enclosure/@sparkle:shortVersionString)[1]' 2>/dev/null | cut -d '"' -f 2)" + expectedTeamID="8U3Y4X5WDQ" + ;; diff --git a/utils/buildLabel.sh b/utils/buildLabel.sh index 8e646ea..e64f81e 100755 --- a/utils/buildLabel.sh +++ b/utils/buildLabel.sh @@ -11,7 +11,7 @@ downloadURL=${1?:"need to provide a download URL."} # ./buildLabel.sh # Use working directory as download folder -tmpDir=$(date "+%Y-%m-%d-%H-%M-%S") +tmpDir="$(pwd)/$(date "+%Y-%m-%d-%H-%M-%S")" # Create a n almost unique folder name mkdir $tmpDir @@ -65,14 +65,14 @@ appInvestigation() { fi } -echo "downloadOut:\n${downloadOut}" +#echo "downloadOut:\n${downloadOut}" archiveTempName=$( echo "${downloadOut}" | head -1 ) echo "archiveTempName: $archiveTempName" archivePath=$( echo "${downloadOut}" | tail -1 ) echo "archivePath: $archivePath" -try1archiveName=${archiveTempName##*/} -try2archiveName=${archivePath##*/} +try1archiveName=${${archiveTempName##*/}%%\?*} +try2archiveName=${${archivePath##*/}%%\?*} fileName_re='^([a-zA-Z0-9\_.%-]*)\.(dmg|pkg|zip|tbz)$' if [[ "${try1archiveName}" =~ $fileName_re ]]; then archiveName=${try1archiveName} @@ -80,10 +80,11 @@ elif [[ "${try2archiveName}" =~ $fileName_re ]]; then archiveName=${try2archiveName} else echo "Could not determine archiveName from “$try1archiveName” and “$try2archiveName”" + #echo "Extensions $archiveTempName:t:e $archivePath:t:e" exit fi -echo "archiveName: $archiveName" +echo "Calculated archiveName: $archiveName" mv $archiveTempName $archiveName name=${archiveName%.*} echo "name: $name" diff --git a/utils/checkLabels.sh b/utils/checkLabels.sh index e90b03a..4dde7c6 100755 --- a/utils/checkLabels.sh +++ b/utils/checkLabels.sh @@ -171,7 +171,7 @@ for label in $allLabels; do else URLextension=$( echo "${URLfilename}" | tail -1 | sed -E 's/.*\.([a-zA-Z]*)\s*/\1/g' | tr -d '\r\n' ) fi - URLextension=${URLextension:l} + URLextension=${${URLextension:l}%%\?*} if [[ "${URLextension}" == "${expectedExtension}" ]]; then echo "${GREEN}OK: download extension MATCH on ${URLextension}${NC}" else