diff --git a/Labels.txt b/Labels.txt index 766ae38..e5bc79d 100644 --- a/Labels.txt +++ b/Labels.txt @@ -9,6 +9,7 @@ adobereaderdc-install adobereaderdc-update aircall airserver +airtame aldente alfred alttab @@ -209,6 +210,7 @@ openvpnconnect openvpnconnectv3 opera pacifist +parsec pdfsam pitch plantronicshub @@ -261,6 +263,7 @@ sonos sonoss1 sonoss2 sourcetree +splashtopsos spotify sublimetext supportapp @@ -297,6 +300,7 @@ vivaldi vlc vmwarehorizonclient vscodium +wallyezflash webex webexmeetings webexteams @@ -310,6 +314,7 @@ xink xquartz yubikeymanagerqt zappy +zohoworkdrive zoom zoomclient zoomrooms diff --git a/fragments/disabled/cdef.sh b/fragments/disabled/cdef.sh deleted file mode 100644 index 21a0641..0000000 --- a/fragments/disabled/cdef.sh +++ /dev/null @@ -1,10 +0,0 @@ - -cdef) - # cdef currently not signed - # credit: Søren Theilgaard (@theilgaard) - name="cdef" - type="pkg" - downloadURL=$(downloadURLFromGit Shufflepuck cdef) - appNewVersion=$(versionFromGit Shufflepuck cdef) - #expectedTeamID="EM3ER8T33A" - ;; diff --git a/fragments/labels/airtame.sh b/fragments/labels/airtame.sh new file mode 100644 index 0000000..bbc5dc7 --- /dev/null +++ b/fragments/labels/airtame.sh @@ -0,0 +1,7 @@ +airtame) + name="Airtame" + type="dmg" + downloadURL="$(curl -fs https://airtame.com/download/ | grep -i platform=mac | head -1 | grep -o -i -E "https.*" | cut -d '"' -f1)" + appNewVersion="$(curl -fsIL "${downloadURL}" | grep -i ^location | sed -E 's/.*\/[a-zA-Z]*-([0-9.]*)\..*/\1/g')" + expectedTeamID="4TPSP88HN2" + ;; \ No newline at end of file diff --git a/fragments/labels/lulu.sh b/fragments/labels/lulu.sh index 72014ee..0720458 100644 --- a/fragments/labels/lulu.sh +++ b/fragments/labels/lulu.sh @@ -1,7 +1,9 @@ lulu) name="LuLu" type="dmg" - downloadURL=$( curl -fs "https://objective-see.com/products/lulu.html" | grep https | grep "$type" | head -1 | tr '"' "\n" | grep "^http" ) - appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)\..*/\1/g' ) + #downloadURL=$( curl -fs "https://objective-see.com/products/lulu.html" | grep https | grep "$type" | head -1 | tr '"' "\n" | grep "^http" ) + #appNewVersion=$( echo "${downloadURL}" | sed -E 's/.*\/[a-zA-Z]*_([0-9.]*)\..*/\1/g' ) + downloadURL=$(downloadURLFromGit objective-see LuLu) + appNewVersion=$(versionFromGit objective-see LuLu) expectedTeamID="VBG97UB4TA" ;; diff --git a/fragments/labels/ringcentralclassicapp.sh b/fragments/labels/ringcentralclassicapp.sh index 78d4186..ef75cee 100644 --- a/fragments/labels/ringcentralclassicapp.sh +++ b/fragments/labels/ringcentralclassicapp.sh @@ -5,4 +5,4 @@ ringcentralclassicapp) expectedTeamID="M932RC5J66" blockingProcesses=( "Glip" ) #blockingProcessesMaxCPU="5" - ;; + ;; \ No newline at end of file diff --git a/fragments/labels/screencloudplayer.sh b/fragments/labels/screencloudplayer.sh index 2bab204..e7c1604 100644 --- a/fragments/labels/screencloudplayer.sh +++ b/fragments/labels/screencloudplayer.sh @@ -1,7 +1,7 @@ screencloudplayer) - # credit: AP Orlebeke (@apizz) - name="ScreenCloud Player" - type="dmg" - downloadURL=$(curl -sL "https://screencloud.com/download" | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p') - expectedTeamID="3C4F953K6P" - ;; \ No newline at end of file + # credit: AP Orlebeke (@apizz) + name="ScreenCloud Player" + type="dmg" + downloadURL=$(curl -sL "https://screencloud.com/download" | sed -n 's/^.*"url":"\([^"]*\)".*$/\1/p') + expectedTeamID="3C4F953K6P" + ;; \ No newline at end of file diff --git a/fragments/labels/splashtopsos.sh b/fragments/labels/splashtopsos.sh new file mode 100644 index 0000000..3c6d3c2 --- /dev/null +++ b/fragments/labels/splashtopsos.sh @@ -0,0 +1,6 @@ +splashtopsos) + name="Splashtop SOS" + type="dmg" + downloadURL="https://download.splashtop.com/sos/SplashtopSOS.dmg" + expectedTeamID="CPQQ3AW49Y" + ;; diff --git a/fragments/labels/zohoworkdrive.sh b/fragments/labels/zohoworkdrive.sh new file mode 100644 index 0000000..f7a0f11 --- /dev/null +++ b/fragments/labels/zohoworkdrive.sh @@ -0,0 +1,11 @@ +zohoworkdrive) +# Using this label expects you to agree to these: +# License Areemant: https://www.zoho.com/workdrive/zohoworkdrive-license-agreement.html +# Privacy policy: https://www.zoho.com/privacy.html + name="ZohoWorkDrive" + type="dmg" + lines=$(curl -fs https://www.zohowebstatic.com/sites/all/themes/zoho/scripts/workdrive.js | grep files-accl.zohopublic.com | tr '"' "\n") + downloadURL=$(echo "$lines" | grep -i "files-accl.zohopublic.com")$(echo "$lines" | grep -i -A17 "files-accl.zohopublic.com" | grep -i -A2 macintosh | tail -1) + expectedTeamID="TZ824L8Y37" + appName="Zoho WorkDrive.app" + ;; diff --git a/utils/buildLabel.sh b/utils/buildLabel.sh index b855208..0e4f2c8 100755 --- a/utils/buildLabel.sh +++ b/utils/buildLabel.sh @@ -2,7 +2,7 @@ export PATH=/usr/bin:/bin:/usr/sbin:/sbin -downloadURL=${1?:"need to provide a download URL"} +downloadURL=${1?:"need to provide a download URL."} # Note: this tool _very_ experimental and does not work in many cases # That being said, it's a great place to start for building up the label in the Case-statement @@ -10,19 +10,23 @@ downloadURL=${1?:"need to provide a download URL"} # Usage # ./buildLabel.sh -tmpDir=$(pwd) # use working directory as download folder (REMEMBER to comment out removal of tmpDir in bottom of script) +# Use working directory as download folder +tmpDir=$(date "+%Y-%m-%d-%H-%M-%S") +# Create a n almost unique folder name +mkdir $tmpDir # change directory to temporary working directory echo "Changing directory to $tmpDir" if ! cd "$tmpDir"; then - echo "error changing directory $tmpDir" - #rm -Rf "$tmpDir" + echo "Error changing directory $tmpDir" exit 1 fi +echo "Working dir: $(pwd)" # download the URL echo "Downloading $downloadURL" -if ! downloadOut="$(curl -fsL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then +echo "Redirecting to (maybe this can help us with version):\n$(curl -fsIL "$downloadURL" | grep -i ^location)" +if ! downloadOut="$(curl -fL "$downloadURL" --remote-header-name --remote-name -w "%{filename_effective}\n%{url_effective}\n")"; then echo "error downloading $downloadURL" exit 2 fi @@ -60,12 +64,25 @@ appInvestigation() { exit 4 fi } -echo "downloadOut: ${downloadOut}" + +echo "downloadOut:\n${downloadOut}" archiveTempName=$( echo "${downloadOut}" | head -1 ) echo "archiveTempName: $archiveTempName" archivePath=$( echo "${downloadOut}" | tail -1 ) echo "archivePath: $archivePath" -archiveName=${archivePath##*/} + +try1archiveName=${archiveTempName##*/} +try2archiveName=${archivePath##*/} +fileName_re='^([a-zA-Z0-9\_.-]*)\.(dmg|pkg|zip|tbz)$' +if [[ "${try1archiveName}" =~ $fileName_re ]]; then + archiveName=${try1archiveName} +elif [[ "${try2archiveName}" =~ $fileName_re ]]; then + archiveName=${try2archiveName} +else + echo "Could not determine archiveName from “$try1archiveName” and “$try2archiveName”" + exit +fi + echo "archiveName: $archiveName" mv $archiveTempName $archiveName name=${archiveName%.*} @@ -125,7 +142,7 @@ echo "**********" echo echo "Labels should be named in small caps, numbers 0-9, “-”, and “_”. No other characters allowed." echo -echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, but also on a web page. See archivePath above if link contains information about this." +echo "appNewVersion is often difficult to find. Can sometimes be found in the filename, sometimes as part of the download redirects, but also on a web page. See redirect and archivePath above if link contains information about this. That is a good place to start" echo echo "$identifier)" echo " name=\"$name\""