-
Notifications
You must be signed in to change notification settings - Fork 1
/
firefox-nightly-32
149 lines (137 loc) · 5.28 KB
/
firefox-nightly-32
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/sh
mkdir /opt/firefox-nightly
cd /opt/firefox-nightly
if [[ $(grep "[[:space:]]ro[[:space:],]" /proc/mounts) ]]; then
mkdir -p /usr/local/share/applications
sed -i 's#/usr/share/applications#/usr/local/share/applications#g' ./$arg
SHARE_APPLICATIONS="local/share/applications"
else
SHARE_APPLICATIONS="share/applications"
fi
echo "#!/bin/sh
rm -R -f /opt/firefox-nightly /usr/$SHARE_APPLICATIONS/firefox-nightly.desktop /usr/local/bin/firefox-nightly" >> /opt/firefox-nightly/remove
chmod a+x /opt/firefox-nightly/remove
mkdir tmp;
cd ./tmp;
echo "
Available languages:
COUNTRY CODE
Acholi ach
Afrikaans af
Albanian sq
Arabic ar
Aragonese an
Armenian hy-AM
Assamese as
Asturian ast
Azerbaijani az
Basque eu
Belarusian be
Bengali (Bangladesh) bn-BD
Bengali (India) bn-IN
Bosnian bs
Breton br
Bulgarian bg
Catalan ca
Chinese (Simplified) zh-CN
Chinese (Traditional) zh-TW
Croatian hr
Czech cs
Danish da
Dutch nl
English (British) en-GB
English (South African) en-ZA
English (United States) en-US
Esperanto eo
Estonian et
Finnish fi
French fr
Frisian fy-NL
Fulah ff
Gaelic (Scotland) gd
Galician gl
German de
Greek el
Gujarati (India) gu-IN
Hebrew he
Hindi (India) hi-IN
Hungarian hu
Icelandic is
Indonesian id
Irish ga-IE
Italian it
Kannada kn
Kazakh kk
Khmer km
Korean ko
Latvian lv
Ligurian lij
Lithuanian lt
Lower Sorbian dsb
Macedonian mk
Maithili mai
Malay ms
Malayalam ml
Marathi mr
Norwegian (Bokmål) nb-NO
Norwegian (Nynorsk) nn-NO
Oriya or
Persian fa
Polish pl
Portuguese (Brazilian) pt-BR
Portuguese (Portugal) pt-PT
Punjabi (India) pa-IN
Romanian ro
Romansh rm
Russian ru
Serbian sr
Sinhala si
Slovak sk
Slovenian sl
Songhai son
Spanish (Argentina) es-AR
Spanish (Chile) es-CL
Spanish (Mexico) es-MX
Spanish (Spain) es-ES
Swedish sv-SE
Tamil ta
Telugu te
Thai th
Turkish tr
Ukrainian uk
Upper Sorbian hsb
Uzbek uz
Vietnamese vi
Welsh cy
Xhosa xh"
read -r -p "(Default: en-US) Type the language: " response
case $response in
''|'ach'|'af'|'sq'|'ar'|'an'|'hy-AM'|'as'|'ast'|'az'|'eu'|'be'|'bn-BD'|'bn-IN'|'bs'|'br'|'bg'|'ca'|'zh-CN'|'zh-TW'|'hr'|'cs'|'da'|'nl'|'en-GB'|'en-ZA'|'en-US'|'eo'|'et'|'fi'|'fr'|'fy-NL'|'ff'|'gd'|'gl'|'de'|'el'|'gu-IN'|'he'|'hi-IN'|'hu'|'is'|'id'|'ga-IE'|'it'|'kn'|'kk'|'km'|'ko'|'lv'|'lij'|'lt'|'dsb'|'mk'|'mai'|'ms'|'ml'|'mr'|'nb-NO'|'nn-NO'|'or'|'fa'|'pl'|'pt-BR'|'pt-PT'|'pa-IN'|'ro'|'rm'|'ru'|'sr'|'si'|'sk'|'sl'|'son'|'es-AR'|'es-CL'|'es-MX'|'es-ES'|'sv-SE'|'ta'|'te'|'th'|'tr'|'uk'|'hsb'|'uz'|'vi'|'cy'|'xh')
wget "https://download.mozilla.org/?product=firefox-nightly-latest&os=linux&lang=$response" --trust-server-names;;
*) rm -R -f /opt/firefox-nightly && echo " $response is not a valid language code, installation aborted!"; exit;;
esac
tar fx firefox-*.tar.bz2
cd ..
mv ./tmp/firefox/* ./
rm -R ./tmp
currentuser=$(who | awk '{print $1}')
chown -R $currentuser /opt/firefox-nightly
ln -s /opt/firefox-nightly/firefox /usr/local/bin/firefox-nightly
rm -R -f /usr/$SHARE_APPLICATIONS/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/firefox-nightly.desktop
echo "";
echo " Firefox Nightly has been installed! ";
echo "";