Merge pull request #174 from scriptingosx/Labels

Labels
This commit is contained in:
Søren Theilgaard
2021-05-20 14:09:53 +02:00
committed by GitHub
2 changed files with 89 additions and 2 deletions

View File

@@ -1415,11 +1415,59 @@ firefox_da)
expectedTeamID="43AQ936H96" expectedTeamID="43AQ936H96"
blockingProcesses=( firefox ) blockingProcesses=( firefox )
;; ;;
firefox_intl)
# This label will try to figure out the selected language of the user,
# and install corrosponding version of Firefox
name="Firefox"
type="dmg"
userLanguage=$(runAsUser defaults read .GlobalPreferences AppleLocale)
printlog "Found language $userLanguage to be used for Firefox."
if ! curl -fs "https://ftp.mozilla.org/pub/firefox/releases/latest/README.txt" | grep -o "=$userLanguage"; then
userLanguage=$(echo $userLanguage | cut -c 1-2)
if ! curl -fs "https://ftp.mozilla.org/pub/firefox/releases/latest/README.txt" | grep "=$userLanguage"; then
userLanguage="en_US"
fi
fi
printlog "Using language $userLanguage for download."
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=$userLanguage"
if ! curl -sfL --output /dev/null -r 0-0 "$downloadURL" ; then
printlog "Download not found for that language. Using en-US"
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
fi
appNewVersion=$(/usr/bin/curl -sl https://www.mozilla.org/en-US/firefox/releases/ | /usr/bin/grep '<html' | /usr/bin/awk -F\" '{ print $8 }') # Credit: William Smith (@meck)
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
;;
firefoxesr|\ firefoxesr|\
firefoxesrpkg) firefoxesrpkg)
name="Firefox" name="Firefox"
type="pkg" type="pkg"
downloadURL="https://download.mozilla.org/?product=firefox-esr-pkg-latest-ssl&os=osx" downloadURL="https://download.mozilla.org/?product=firefox-esr-pkg-latest-ssl&os=osx"
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i "^location" | awk '{print $2}' | sed -E 's/.*releases\/([0-9.]*)esr.*/\1/g')
expectedTeamID="43AQ936H96"
blockingProcesses=( firefox )
;;
firefoxesr_intl)
# This label will try to figure out the selected language of the user,
# and install corrosponding version of Firefox ESR
name="Firefox"
type="dmg"
userLanguage=$(runAsUser defaults read .GlobalPreferences AppleLocale)
printlog "Found language $userLanguage to be used for Firefox."
if ! curl -fs "https://ftp.mozilla.org/pub/firefox/releases/latest-esr/README.txt" | grep -o "=$userLanguage"; then
userLanguage=$(echo $userLanguage | cut -c 1-2)
if ! curl -fs "https://ftp.mozilla.org/pub/firefox/releases/latest-esr/README.txt" | grep "=$userLanguage"; then
userLanguage="en_US"
fi
fi
printlog "Using language $userLanguage for download."
downloadURL="https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=osx&lang=$userLanguage"
# https://download.mozilla.org/?product=firefox-esr-latest-ssl&os=osx&lang=en-US
if ! curl -sfL --output /dev/null -r 0-0 "$downloadURL" ; then
printlog "Download not found for that language. Using en-US"
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
fi
appNewVersion=$(curl -fsIL "$downloadURL" | grep -i "^location" | awk '{print $2}' | sed -E 's/.*releases\/([0-9.]*)esr.*/\1/g')
expectedTeamID="43AQ936H96" expectedTeamID="43AQ936H96"
blockingProcesses=( firefox ) blockingProcesses=( firefox )
;; ;;
@@ -1922,10 +1970,11 @@ nextcloud)
type="pkg" type="pkg"
#packageID="com.nextcloud.desktopclient" #packageID="com.nextcloud.desktopclient"
downloadURL=$(downloadURLFromGit nextcloud desktop) downloadURL=$(downloadURLFromGit nextcloud desktop)
#appNewVersion=$(versionFromGit nextcloud desktop) appNewVersion=$(versionFromGit nextcloud desktop)
# The version of the app is not equal to the version listed on GitHub. # The version of the app is not equal to the version listed on GitHub.
# App version something like "3.1.3git (build 4850)" but web page lists as "3.1.3" # App version something like "3.1.3git (build 4850)" but web page lists as "3.1.3"
# Also it does not math packageID version "3.1.34850" # Also it does not math packageID version "3.1.34850"
appCustomVersion(){defaults read /Applications/nextcloud.app/Contents/Info.plist CFBundleShortVersionString | sed -E 's/^([0-9.]*)git.*/\1/g'}
expectedTeamID="NKUJUXUJ3B" expectedTeamID="NKUJUXUJ3B"
;; ;;
nomad) nomad)
@@ -2420,6 +2469,15 @@ sublimetext)
#appNewVersion=$(curl -Is https://download.sublimetext.com/latest/stable/osx | grep "Location:" | sed -n -e 's/^.*Sublime Text //p' | sed 's/.dmg//g' | sed $'s/[^[:print:]\t]//g') # Alternative from @Oh4sh0 #appNewVersion=$(curl -Is https://download.sublimetext.com/latest/stable/osx | grep "Location:" | sed -n -e 's/^.*Sublime Text //p' | sed 's/.dmg//g' | sed $'s/[^[:print:]\t]//g') # Alternative from @Oh4sh0
expectedTeamID="Z6D26JE4Y4" expectedTeamID="Z6D26JE4Y4"
;; ;;
supportapp)
# credit: Søren Theilgaard (@theilgaard)
name="Support"
type="pkg"
packageID="nl.root3.support"
downloadURL=$(downloadURLFromGit root3nl SupportApp)
appNewVersion=$(versionFromGit root3nl SupportApp)
expectedTeamID="98LJ4XBGYK"
;;
suspiciouspackage) suspiciouspackage)
# credit: Mischa van der Bent (@mischavdbent) # credit: Mischa van der Bent (@mischavdbent)
name="Suspicious Package" name="Suspicious Package"
@@ -2492,6 +2550,14 @@ textmate)
appNewVersion=$(versionFromGit "textmate" "textmate") appNewVersion=$(versionFromGit "textmate" "textmate")
expectedTeamID="45TL96F76G" expectedTeamID="45TL96F76G"
;; ;;
theunarchiver)
name="The Unarchiver"
type="dmg"
downloadURL="https://dl.devmate.com/com.macpaw.site.theunarchiver/TheUnarchiver.dmg"
#appNewVersion=""
expectedTeamID="S8EX82NJP6"
appName="The Unarchiver.app"
;;
things) things)
name="Things" name="Things"
type="zip" type="zip"
@@ -2527,6 +2593,14 @@ torbrowser)
appNewVersion=$(curl -fs https://www.torproject.org/download/ | grep "downloadLink" | grep dmg | head -1 | cut -d '"' -f 4 | cut -d / -f 4) appNewVersion=$(curl -fs https://www.torproject.org/download/ | grep "downloadLink" | grep dmg | head -1 | cut -d '"' -f 4 | cut -d / -f 4)
expectedTeamID="MADPSAYN6T" expectedTeamID="MADPSAYN6T"
;; ;;
trex)
# credit: Søren Theilgaard (@theilgaard)
name="TRex"
type="zip"
downloadURL=$(downloadURLFromGit amebalabs TRex)
appNewVersion=$(versionFromGit amebalabs TRex)
expectedTeamID="X93LWC49WV"
;;
tunnelbear) tunnelbear)
name="TunnelBear" name="TunnelBear"
type="zip" type="zip"
@@ -2690,6 +2764,14 @@ wireshark)
appNewVersion=$(curl -fs https://www.wireshark.org/download.html | grep "Stable Release" | grep -o "(.*.)" | cut -f2 | head -1 | awk -F '[()]' '{print $2}') appNewVersion=$(curl -fs https://www.wireshark.org/download.html | grep "Stable Release" | grep -o "(.*.)" | cut -f2 | head -1 | awk -F '[()]' '{print $2}')
expectedTeamID="7Z6EMTD2C6" expectedTeamID="7Z6EMTD2C6"
;; ;;
wwdc)
# credit: Søren Theilgaard (@theilgaard)
name="WWDC"
type="dmg"
downloadURL=$(downloadURLFromGit insidegui WWDC)
appNewVersion=$(versionFromGit insidegui WWDC)
expectedTeamID="8C7439RJLG"
;;
xink) xink)
name="Xink" name="Xink"
type="zip" type="zip"

View File

@@ -69,7 +69,9 @@ ferdi
figma figma
firefox firefox
firefox_da firefox_da
firefox_intl
firefoxesr firefoxesr
firefoxesr_intl
firefoxesrpkg firefoxesrpkg
firefoxpkg firefoxpkg
front front
@@ -224,6 +226,7 @@ sonoss2
sourcetree sourcetree
spotify spotify
sublimetext sublimetext
supportapp
suspiciouspackage suspiciouspackage
swiftruntimeforcommandlinetools swiftruntimeforcommandlinetools
tableaureader tableaureader
@@ -233,16 +236,17 @@ teamviewerhost
teamviewerqs teamviewerqs
telegram telegram
textmate textmate
theunarchiver
things things
thunderbird thunderbird
tigervnc tigervnc
toggltrack toggltrack
torbrowser torbrowser
trex
tunnelbear tunnelbear
tunnelblick tunnelblick
umbrellaroamingclient umbrellaroamingclient
universaltypeclient universaltypeclient
universaltypeclient
vagrant vagrant
vanilla vanilla
veracrypt veracrypt
@@ -259,6 +263,7 @@ whatsapp
wickrme wickrme
wickrpro wickrpro
wireshark wireshark
wwdc
xeroxphaser7800 xeroxphaser7800
xink xink
yubikeymanagerqt yubikeymanagerqt