|
|
|
@ -168,10 +168,22 @@ function true_firefox { |
|
|
|
echo "=================" |
|
|
|
firefox_lang=$(echo $LANG | cut -d. -f1) |
|
|
|
|
|
|
|
case "$firefox_lang" in |
|
|
|
fr*) firefox_lang=fr ;; |
|
|
|
es*) firefox_lang=es-ES ;; |
|
|
|
*) firefox_lang=en-US ;; |
|
|
|
esac |
|
|
|
echo "$firefox_lang" |
|
|
|
|
|
|
|
if [[ ! /usr/local/bin/firefox -ef /opt/firefox/firefox ]]; then |
|
|
|
set -e |
|
|
|
cd /tmp |
|
|
|
firefox_archive_url=$(curl -s "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=$firefox_lang" | cut -d '"' -f2) |
|
|
|
|
|
|
|
# https://download-installer.cdn.mozilla.net/pub/firefox/releases/146.0.1/linux-x86_64/en-US/firefox-146.0.1.tar.xz |
|
|
|
firefox_version=$(curl -sI https://www.firefox.com/$firefox_lang/firefox/notes/ | grep location: | cut -d/ -f4) |
|
|
|
firefox_archive_url="https://download-installer.cdn.mozilla.net/pub/firefox/releases/$firefox_version/linux-x86_64/$firefox_lang/firefox-$firefox_version.tar.xz" |
|
|
|
echo $firefox_archive_url |
|
|
|
|
|
|
|
wget "$firefox_archive_url" |
|
|
|
firefox_archive=${firefox_archive_url##*/} |
|
|
|
sudo mkdir /opt/firefox -p |
|
|
|
|