From b0dd72c9dd2e07b0cc66543697c2cf4fc7e59edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Mon, 17 May 2021 16:29:20 +0200 Subject: [PATCH] firefox intl 2 new labels that should figure out the language used by the user, and then install the Firefox version with that language. --- Installomator.sh | 36 ++++++++++++++++++++++++++++++++++++ Labels.txt | 7 ++----- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/Installomator.sh b/Installomator.sh index c08d85d..7032c1c 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -1355,11 +1355,47 @@ firefox_da) expectedTeamID="43AQ936H96" blockingProcesses=( firefox ) ;; +firefox_intl) + name="Firefox" + type="dmg" + userLanguage=$(runAsUser defaults read .GlobalPreferences AppleLocale | cut -c 1-2) + printlog "Found language $userLanguage to be used for Firefox." + if [[ "$userLanguage" == "en" ]]; then + userLanguage="en_US" + fi + 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 '