#!/bin/sh mkdir /opt/firefox-nightly cd /opt/firefox-nightly echo "#!/bin/sh rm -R -f /opt/firefox-nightly /usr/share/applications/AM-firefox-nightly.desktop /usr/local/bin/firefox-nightly" >> /opt/firefox-nightly/remove chmod a+x /opt/firefox-nightly/remove mkdir tmp; cd ./tmp; LANGUAGE=$(curl -Ls https://raw.githubusercontent.com/linuxmint/mdm/master/config/locale.alias | grep -i "$LANG" | grep -o '^\S*') CODE=$(curl -Ls https://releases.mozilla.org/pub/firefox/releases/latest/README.txt | cut -d ':' -f2 | grep -i $LANGUAGE | cut -d '=' -f2) wget "https://download.mozilla.org/?product=firefox-nightly-latest&os=linux64&lang=$CODE" --trust-server-names tar fx firefox-*.tar.bz2 cd .. mv ./tmp/firefox/* ./ rm -R ./tmp ln -s /opt/firefox-nightly/firefox /usr/local/bin/firefox-nightly rm -R -f /usr/share/applications/AM-firefox-nightly.desktop echo "[Desktop Entry] Name=Firefox Nightly Comment=Web Browser Exec=/opt/firefox-nightly/firefox %u Terminal=false Type=Application Icon=/opt/firefox-nightly/browser/chrome/icons/default/default128.png Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true Actions=Private; [Desktop Action Private] Exec=/opt/firefox-nightly/firefox --private-window %u Name=Open in private mode" >> /usr/share/applications/AM-firefox-nightly.desktop