-
Notifications
You must be signed in to change notification settings - Fork 1
/
firefox-dev
executable file
·47 lines (39 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
46
47
#!/usr/bin/env bash
TMP="/tmp/firefox-developer"
ARCHIVE="$TMP/firefox-developer.tar.bz2"
INSTALL_DIR="$HOME/.local/share/firefox-developer"
FIREFOX_BIN="$INSTALL_DIR/firefox"
mkdir -p "$TMP"
mkdir -p "$INSTALL_DIR"
cd "$TMP" || exit 1
echo "Temp dir: $TMP"
echo "Download firefox-developer archive"
curl -L -o "$ARCHIVE" \
"https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US"
echo "Extract and move to $INSTALL_DIR"
tar xf "$ARCHIVE"
mv firefox/* "$INSTALL_DIR"
echo "Creating desktop entry"
# Inspired by:
# 1. /usr/share/applications/firefox.desktop
# 2. https://gist.github.com/mahammad/e54e4be8938edf4d6c15?permalink_comment_id=4382260#gistcomment-4382260
cat > "$HOME/.local/share/applications/firefox-developer.desktop" <<EOL
[Desktop Entry]
Name=Firefox Developer
Exec=$FIREFOX_BIN %u
Comment=The firefox developer browser
Terminal=false
Icon=$INSTALL_DIR/browser/chrome/icons/default/default128.png
X-MultipleArgs=false
Type=Application
Categories=Network;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;video/webm;application/x-xpinstall;
StartupWMClass=firefox-aurora
Actions=new-window;new-private-window;
[Desktop Action new-window]
Name=Open a New Window
Exec=$FIREFOX_BIN -new-window
[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=$FIREFOX_BIN -private-window
EOL