This commit is contained in:
Søren Theilgaard
2021-05-20 16:14:48 +02:00
2 changed files with 97 additions and 2 deletions

View File

@@ -1423,11 +1423,59 @@ firefox_da)
expectedTeamID="43AQ936H96"
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|\
firefoxesrpkg)
name="Firefox"
type="pkg"
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"
blockingProcesses=( firefox )
;;
@@ -1535,6 +1583,7 @@ googlejapaneseinput)
type="pkgInDmg"
pkgName="GoogleJapaneseInput.pkg"
downloadURL="https://dl.google.com/japanese-ime/latest/GoogleJapaneseInput.dmg"
blockingProcesses=( NONE )
expectedTeamID="EQHXZ8M8AV"
;;
gotomeeting)
@@ -1930,10 +1979,11 @@ nextcloud)
type="pkg"
#packageID="com.nextcloud.desktopclient"
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.
# 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"
appCustomVersion(){defaults read /Applications/nextcloud.app/Contents/Info.plist CFBundleShortVersionString | sed -E 's/^([0-9.]*)git.*/\1/g'}
expectedTeamID="NKUJUXUJ3B"
;;
nomad)
@@ -2428,6 +2478,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
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)
# credit: Mischa van der Bent (@mischavdbent)
name="Suspicious Package"
@@ -2492,6 +2551,13 @@ telegram)
appNewVersion=$( curl -fs https://macos.telegram.org | grep anchor | head -1 | sed -E 's/.*a>([0-9.]*) .*/\1/g' )
expectedTeamID="6N38VWS5BX"
;;
textexpander)
name="TextExpander"
type="zip"
downloadURL="https://textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx"
appNewVersion=$( curl -fsIL "https://textexpander.com/cgi-bin/redirect.pl?cmd=download&platform=osx" | grep -i "^location" | awk '{print $2}' | tail -1 | cut -d "_" -f2 | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p' )
expectedTeamID="7PKJ6G4DXL"
;;
textmate)
name="TextMate"
type="tbz"
@@ -2500,6 +2566,14 @@ textmate)
appNewVersion=$(versionFromGit "textmate" "textmate")
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)
name="Things"
type="zip"
@@ -2535,6 +2609,14 @@ torbrowser)
appNewVersion=$(curl -fs https://www.torproject.org/download/ | grep "downloadLink" | grep dmg | head -1 | cut -d '"' -f 4 | cut -d / -f 4)
expectedTeamID="MADPSAYN6T"
;;
trex)
# credit: Søren Theilgaard (@theilgaard)
name="TRex"
type="zip"
downloadURL=$(downloadURLFromGit amebalabs TRex)
appNewVersion=$(versionFromGit amebalabs TRex)
expectedTeamID="X93LWC49WV"
;;
tunnelbear)
name="TunnelBear"
type="zip"
@@ -2698,6 +2780,14 @@ wireshark)
appNewVersion=$(curl -fs https://www.wireshark.org/download.html | grep "Stable Release" | grep -o "(.*.)" | cut -f2 | head -1 | awk -F '[()]' '{print $2}')
expectedTeamID="7Z6EMTD2C6"
;;
wwdc)
# credit: Søren Theilgaard (@theilgaard)
name="WWDC"
type="dmg"
downloadURL=$(downloadURLFromGit insidegui WWDC)
appNewVersion=$(versionFromGit insidegui WWDC)
expectedTeamID="8C7439RJLG"
;;
xink)
name="Xink"
type="zip"

View File

@@ -70,7 +70,9 @@ ferdi
figma
firefox
firefox_da
firefox_intl
firefoxesr
firefoxesr_intl
firefoxesrpkg
firefoxpkg
front
@@ -225,6 +227,7 @@ sonoss2
sourcetree
spotify
sublimetext
supportapp
suspiciouspackage
swiftruntimeforcommandlinetools
tableaureader
@@ -234,16 +237,17 @@ teamviewerhost
teamviewerqs
telegram
textmate
theunarchiver
things
thunderbird
tigervnc
toggltrack
torbrowser
trex
tunnelbear
tunnelblick
umbrellaroamingclient
universaltypeclient
universaltypeclient
vagrant
vanilla
veracrypt
@@ -260,6 +264,7 @@ whatsapp
wickrme
wickrpro
wireshark
wwdc
xeroxphaser7800
xink
yubikeymanagerqt