firefox-beta 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. APP=firefox-beta
  3. # CREATE THE DIRECTORY
  4. mkdir -p /opt/"$APP"
  5. cd /opt/"$APP"
  6. # ADD THE REMOVER
  7. echo '#!/bin/sh' >> /opt/"$APP"/remove
  8. echo "rm -R -f /opt/$APP /usr/local/share/applications/$APP-AM.desktop /usr/local/bin/$APP" >> /opt/"$APP"/remove
  9. chmod a+x /opt/"$APP"/remove
  10. # DOWNLOAD THE ARCHIVE
  11. mkdir -p tmp
  12. cd ./tmp
  13. LANGUAGE=$(curl -Ls https://raw.githubusercontent.com/linuxmint/mdm/master/config/locale.alias | grep -i "$LANG" | grep -o '^\S*')
  14. CODE=$(curl -Ls https://releases.mozilla.org/pub/firefox/releases/latest/README.txt | cut -d ':' -f2 | grep -i $LANGUAGE | cut -d '=' -f2)
  15. wget "https://download.mozilla.org/?product=$APP-latest&os=linux&lang=$CODE" --trust-server-names
  16. [ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
  17. cd ..
  18. mv ./tmp/firefox/* ./
  19. rm -R ./tmp
  20. # LINK TO PATH
  21. ln -s "/opt/$APP/firefox" "/usr/local/bin/$APP"
  22. # LAUNCHER
  23. echo "[Desktop Entry]
  24. Name=Firefox Beta
  25. Comment=Web Browser
  26. Exec=/opt/$APP/firefox %u
  27. Terminal=false
  28. Type=Application
  29. Icon=/opt/$APP/browser/chrome/icons/default/default128.png
  30. Categories=Network;WebBrowser;
  31. 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;
  32. StartupNotify=true
  33. Actions=Private;
  34. [Desktop Action Private]
  35. Exec=/opt/$APP/firefox --private-window %u
  36. Name=Open in private mode" > /usr/local/share/applications/"$APP"-AM.desktop