-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_firefox.sh
More file actions
executable file
·93 lines (70 loc) · 2.21 KB
/
setup_firefox.sh
File metadata and controls
executable file
·93 lines (70 loc) · 2.21 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#!/bin/bash
# Script for downloading and updating firefox
sudo mkdir /opt/scripts
sudo cat <<EOF>/opt/scripts/latest_firefox.sh
#!/bin/bash
# this download the latest verions from beta and stable
cd /opt
echo "Getting Latest Firefox-beta"
rm -f FirefoxBetaSetup.tar.bz2
rm -rf firefox-beta
mkdir -m 775 firefox-beta
wget -O FirefoxBetaSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-beta-latest&os=linux64&lang=en-US"
tar -xjf FirefoxBetaSetup.tar.bz2 -C firefox-beta --strip-components=1
chgrp -R staff firefox-beta
rm -f FirefoxBetaSetup.tar.bz2
echo "Getting Latest Firefox-stable"
rm -f FirefoxSetup.tar.bz2
rm -rf firefox-stable
mkdir -m 775 firefox-stable
wget -O FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
tar -xjf FirefoxSetup.tar.bz2 -C firefox-stable --strip-components=1
chgrp -R staff firefox-stable
rm -f FirefoxSetup.tar.bz2
EOF
sudo chmod +x /opt/scripts/latest_firefox.sh
# Icons for firefox and firefox-beta
sudo cat <<EOF>/usr/share/applications/firefox.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/firefox-stable/firefox -no-remote -P
Name=Firefox
Icon=firefox
Categories=Internet
Actions=NewWindow;NewPrivateWindow;
[Desktop Action NewWindow]
Name=Open a New Window
Exec=/opt/firefox-stable/firefox -new-window
OnlyShowIn=Unity;
[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=/opt/firefox-stable/firefox -private-window -P -no-remote
OnlyShowIn=Unity;
EOF
sudo cat <<EOF>/usr/share/applications/firefox-beta.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/opt/firefox-beta/firefox -no-remote -P
Name=Firefox-beta
Icon=firefox
Categories=Internet
Actions=NewWindow;NewPrivateWindow;
[Desktop Action NewWindow]
Name=Open a New Window
Exec=/opt/firefox-beta/firefox -new-window
OnlyShowIn=Unity;
[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Exec=/opt/firefox-beta/firefox -private-window -P -no-remote
OnlyShowIn=Unity;
EOF
sudo chmod +x /usr/share/applications/firefox.desktop
sudo chmod +x /usr/share/applications/firefox-beta.desktop
# Download firefox
sudo /opt/scripts/latest_firefox.sh