-
-
Notifications
You must be signed in to change notification settings - Fork 39
/
firefox-dev
45 lines (36 loc) · 1.46 KB
/
firefox-dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
APP=firefox-dev
# CREATE THE DIRECTORY
mkdir -p /opt/"$APP"
cd /opt/"$APP"
# ADD THE REMOVER
echo '#!/bin/sh' >> /opt/"$APP"/remove
echo "rm -R -f /opt/$APP /usr/local/share/applications/$APP-AM.desktop /usr/local/bin/$APP" >> /opt/"$APP"/remove
chmod a+x /opt/"$APP"/remove
# DOWNLOAD THE ARCHIVE
mkdir -p 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-devedition-latest&os=linux64&lang=$CODE" --trust-server-names
[ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
cd ..
mv ./tmp/firefox/* ./
rm -R ./tmp
# LINK TO PATH
ln -s "/opt/$APP/firefox" "/usr/local/bin/$APP"
# LAUNCHER
echo "[Desktop Entry]
Name=Firefox DEV
Comment=Web Browser
Exec=/opt/$APP/firefox %u
Terminal=false
Type=Application
Icon=/opt/$APP/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/$APP/firefox --private-window %u
Name=Open in private mode" > /usr/local/share/applications/"$APP"-AM.desktop