Installomator icon indicating copy to clipboard operation
Installomator copied to clipboard

Add Firefox ESR Next

Open huexley opened this issue 6 months ago • 0 comments

Hi, Firefox has a new ESR branche named "Next". I've made a quick and dirty adaptation for my use :

firefoxesr_next_intl)
    # This label will try to figure out the selected language of the user,
    # and install corrosponding version of Firefox ESR Next
    name="Firefox"
    type="dmg"
    userLanguage=$(runAsUser defaults read .GlobalPreferences AppleLocale | tr '_' '-')
    printlog "Found language $userLanguage to be used for $name."
    releaseURL="https://ftp.mozilla.org/pub/firefox/releases/latest-esr/README.txt"
    until curl -fs $releaseURL | grep -q "=$userLanguage"; do
        if [ ${#userLanguage} -eq 2 ]; then
            break
        fi
        printlog "No locale matching '$userLanguage', trying '${userLanguage:0:2}'"
        userLanguage=${userLanguage:0:2}
    done
    printlog "Using language '$userLanguage' for download."
    downloadURL="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=osx&lang=$userLanguage"
    if ! curl -sfL --output /dev/null -r 0-0 $downloadURL; then
        printlog "Download not found for '$userLanguage', using default ('en-US')."
        downloadURL="https://download.mozilla.org/?product=firefox-esr-next-latest-ssl&os=osx"
    fi
    firefoxVersions=$(curl -fs "https://product-details.mozilla.org/1.0/firefox_versions.json")
    appNewVersion=$(getJSONValue "$firefoxVersions" "FIREFOX_ESR_NEXT")
    expectedTeamID="43AQ936H96"
    blockingProcesses=( firefox )
    printlog "WARNING for ERROR: Label firefox and firefox_intl should not be used. Instead use firefoxpkg and firefoxpkg_intl as per recommendations from Firefox. It's not fully certain that the app actually gets updated here. firefoxpkg and firefoxpkg_intl will have built in updates and make sure the client is updated in the future." REQ
    ;;

huexley avatar Aug 20 '24 06:08 huexley