Merge pull request #455 from Installomator/Theile-labels-2022-03

Theile labels 2022 03
This commit is contained in:
Armin Briegel
2022-05-12 09:43:02 +02:00
committed by GitHub
19 changed files with 235 additions and 112 deletions

View File

@@ -4,17 +4,17 @@ firefox_intl)
name="Firefox"
type="dmg"
userLanguage=$(runAsUser defaults read .GlobalPreferences AppleLocale)
printlog "Found language $userLanguage to be used for Firefox."
printlog "Found language $userLanguage to be used for Firefox." WARN
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."
printlog "Using language $userLanguage for download." WARN
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"
printlog "Download not found for that language. Using en-US" WARN
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=en-US"
fi
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)