yamal
08-01-2008, 08:05 AM
This script looks if the insecure Firefox firefox=2.0.0.11-1mepis1 is installed, and if found replaces it with the latest Iceweasel 2.
After that it will give you the option to install Mozilla's Firefox 3 parallel to Iceweasel in opt.
It will give you a language choice and then downloads that package from the Mozilla server and installs it.
At the end it makes a desktop file, so that an entry appears in the K-menu as an icon that you can drag on to the kicker.
#!/bin/bash
if [ `whoami` != "root" ]; then
echo "You should run this as root"
exit
fi
mkdir ff23
cd ./ff23
rm firefox-*.tar.bz2
rm /opt/firefox-*.tar.bz2
# Look if firefox=2.0.0.11-1mepis1 is installed
dpkg -l | grep firefox | grep 2.0.0.11-1mepis
if [ $? = "0" ]; then
apt-get --purge remove firefox=2.0.0.11-1mepis1
apt-get install iceweasel
apt-get -f install
fi
kdialog --yesno "Do you want to install Firefox 3 parallel to Iceweasel?"
if [ $? = "0" ]; then
XXX=$(kdialog --menu "Select a language:" $LANG "$LANG" en_US "en_US" XX "Something else")
XXX=`echo $XXX | tr "_" "-"`
if [ $XXX != "XX" ]; then
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/linux-i686/$XXX/firefox-*.tar.bz2
if [ $? != "0" ]; then
XXX=$(kdialog --inputbox "I am sorry $LANG is not available,
enter one of the available languages: af ar be ca cs da
de el en-GB es-AR es-ES
eu fi fr fy-NL ga-IE gu-IN he hu id
it ja ka ko ku lt mk mn nb-NO nl nn-NO
pa-IN pl pt-BR pt_PT ro ru si sk sl
sq sr sv-SE tr uk zh-CN zh-TW")
XXX=`echo $XXX | tr "_" "-"`
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/linux-i686/$XXX/firefox-*.tar.bz2
fi
else
XXX=$(kdialog --inputbox "Enter your preferred language: af ar be ca cs da
de el en-GB es-AR es-ES
eu fi fr fy-NL ga-IE gu-IN he hu id
it ja ka ko ku lt mk mn nb-NO nl nn-NO
pa-IN pl pt-BR pt_PT ro ru si sk sl
sq sr sv-SE tr uk zh-CN zh-TW")
XXX=`echo $XXX | tr "_" "-"`
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/linux-i686/$XXX/firefox-*.tar.bz2
fi
cp firefox-*.tar.bz2 /opt || kdialog --msgbox "Failed to install Firefox 3"
cd /opt
tar -xvjf firefox-*.tar.bz2 || exit
cd ./firefox/plugins
cp libnullplugin.so /usr/lib/firefox/plugins
cd -
rm -r ./firefox/plugins
rm firefox-*.tar.bz2
ln -s /usr/lib/firefox/plugins /opt/firefox/plugins
ln -sf /opt/firefox/firefox /usr/bin/firefox
echo "[Desktop Entry]
Encoding=UTF-8
Name=Firefox Web Browser
Name[bg]=Ã˜Ã½Ñ‚ÃµÑ€à ½ÃµÑ‚ ñрðу÷ѠŠÃ‘€ (Firefox)
Name[ca]=Navegador web Firefox
Name[cs]=Firefox Webový prohlÞeÄÂ
Name[el]=ÃŽ εÃÂÎ¹Î·Î³Î®à „Î·Ã‚ ΙÃÄοàFirefox
Name[es]=Navegador web Firefox
Name[fa]=مرورگؠ± اینتر٠†Ã˜ÂªÃ›ÂŒ Firefox
Name[fi]=Firefox-webselain
Name[fr]=Navigateur Web Firefox
Name[hu]=Firefox webböngésző
Name[it]=Firefox Browser Web
Name[ja]=Firefox ウェブムブラウ゠¶
Name[ko]=Firefox 웹 브ëÂ¼ìš°ì €
Name[nb]=Firefox Nettleser
Name[nl]=Firefox webbrowser
Name[nn]=Firefox Nettlesar
Name[no]=Firefox Nettleser
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Firefox Navegador Web
Name[pt_BR]=Navegador Web Firefox
Name[sk]=Internetový prehliadaĠFirefox
Name[sv]=Webbläsaren Firefox
Comment=Browse the World Wide Web
Comment[bg]=Ã¡ÑŠÑ€Ñ„Ã¸à €Ã°Ã½Ãµ ò ÜрõöðѠð
Comment[ca]=Navegueu per el web
Comment[cs]=ProhlÞenàstránek World Wide Webu
Comment[de]=Im Internet surfen
Comment[el]=ÃŽ εÃÂιηγηà ŽÂ¸ÃŽÂµÃŽÂ¯Ã„ε ÃÄον ÀαγκÌà ŽÂ¼ÃŽÂ¹ÃŽÂ¿ ιÃÄÃÂŒ
Comment[es]=Navegue por la web
Comment[fa]=صÙÂØÂات شبکه جهانی اینتر٠†Ã˜Âª را مرور نماییØ ¯
Comment[fi]=Selaa Internetin www-sivuja
Comment[fr]=Navigue sur Internet
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=ウェブã‚ ’閲覧ã—㠾ã™
Comment[ko]=웹ì„ ëŒ아 다닙니ë‹ ¤
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[sk]=Prehliadanie internetu
Comment[sv]=Surfa på webben
GenericName=Web Browser
GenericName[bg]=Ã˜Ã½Ñ‚ÃµÑ€à ½ÃµÑ‚ ñрðу÷ѠŠÃ‘€
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlÞeÄÂ
GenericName[el]=ÃŽ εÃÂÎ¹Î·Î³Î·à „Î®Ã‚ ιÃÄοÃÂ
GenericName[es]=Navegador web
GenericName[fa]=مرورگؠ± اینتر٠†Ã˜ÂªÃ›ÂŒ
GenericName[fi]=Webselain
GenericName[fr]=Navigateur Web
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブム»Ã£ÂƒÂ–ラウã‚ ¶
GenericName[ko]=웹 브ëÂ¼ìš°ì €
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[sk]=Internetový prehliadaÄÂ
GenericName[sv]=Webbläsare
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox.png
Categories=WebBrowser;Network;
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
StartupWMClass=firefox-bin
StartupNotify=true
" > /usr/share/applications/firefox.desktop
fi
exit
http://www.xs4all.nl/~beukrode/yamal/install_iceweasel&FF3.sh
Edit: removed newbie warning, since this is essentially a simple script.
After that it will give you the option to install Mozilla's Firefox 3 parallel to Iceweasel in opt.
It will give you a language choice and then downloads that package from the Mozilla server and installs it.
At the end it makes a desktop file, so that an entry appears in the K-menu as an icon that you can drag on to the kicker.
#!/bin/bash
if [ `whoami` != "root" ]; then
echo "You should run this as root"
exit
fi
mkdir ff23
cd ./ff23
rm firefox-*.tar.bz2
rm /opt/firefox-*.tar.bz2
# Look if firefox=2.0.0.11-1mepis1 is installed
dpkg -l | grep firefox | grep 2.0.0.11-1mepis
if [ $? = "0" ]; then
apt-get --purge remove firefox=2.0.0.11-1mepis1
apt-get install iceweasel
apt-get -f install
fi
kdialog --yesno "Do you want to install Firefox 3 parallel to Iceweasel?"
if [ $? = "0" ]; then
XXX=$(kdialog --menu "Select a language:" $LANG "$LANG" en_US "en_US" XX "Something else")
XXX=`echo $XXX | tr "_" "-"`
if [ $XXX != "XX" ]; then
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/linux-i686/$XXX/firefox-*.tar.bz2
if [ $? != "0" ]; then
XXX=$(kdialog --inputbox "I am sorry $LANG is not available,
enter one of the available languages: af ar be ca cs da
de el en-GB es-AR es-ES
eu fi fr fy-NL ga-IE gu-IN he hu id
it ja ka ko ku lt mk mn nb-NO nl nn-NO
pa-IN pl pt-BR pt_PT ro ru si sk sl
sq sr sv-SE tr uk zh-CN zh-TW")
XXX=`echo $XXX | tr "_" "-"`
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/linux-i686/$XXX/firefox-*.tar.bz2
fi
else
XXX=$(kdialog --inputbox "Enter your preferred language: af ar be ca cs da
de el en-GB es-AR es-ES
eu fi fr fy-NL ga-IE gu-IN he hu id
it ja ka ko ku lt mk mn nb-NO nl nn-NO
pa-IN pl pt-BR pt_PT ro ru si sk sl
sq sr sv-SE tr uk zh-CN zh-TW")
XXX=`echo $XXX | tr "_" "-"`
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.0/linux-i686/$XXX/firefox-*.tar.bz2
fi
cp firefox-*.tar.bz2 /opt || kdialog --msgbox "Failed to install Firefox 3"
cd /opt
tar -xvjf firefox-*.tar.bz2 || exit
cd ./firefox/plugins
cp libnullplugin.so /usr/lib/firefox/plugins
cd -
rm -r ./firefox/plugins
rm firefox-*.tar.bz2
ln -s /usr/lib/firefox/plugins /opt/firefox/plugins
ln -sf /opt/firefox/firefox /usr/bin/firefox
echo "[Desktop Entry]
Encoding=UTF-8
Name=Firefox Web Browser
Name[bg]=Ã˜Ã½Ñ‚ÃµÑ€à ½ÃµÑ‚ ñрðу÷ѠŠÃ‘€ (Firefox)
Name[ca]=Navegador web Firefox
Name[cs]=Firefox Webový prohlÞeÄÂ
Name[el]=ÃŽ εÃÂÎ¹Î·Î³Î®à „Î·Ã‚ ΙÃÄοàFirefox
Name[es]=Navegador web Firefox
Name[fa]=مرورگؠ± اینتر٠†Ã˜ÂªÃ›ÂŒ Firefox
Name[fi]=Firefox-webselain
Name[fr]=Navigateur Web Firefox
Name[hu]=Firefox webböngésző
Name[it]=Firefox Browser Web
Name[ja]=Firefox ウェブムブラウ゠¶
Name[ko]=Firefox 웹 브ëÂ¼ìš°ì €
Name[nb]=Firefox Nettleser
Name[nl]=Firefox webbrowser
Name[nn]=Firefox Nettlesar
Name[no]=Firefox Nettleser
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Firefox Navegador Web
Name[pt_BR]=Navegador Web Firefox
Name[sk]=Internetový prehliadaĠFirefox
Name[sv]=Webbläsaren Firefox
Comment=Browse the World Wide Web
Comment[bg]=Ã¡ÑŠÑ€Ñ„Ã¸à €Ã°Ã½Ãµ ò ÜрõöðѠð
Comment[ca]=Navegueu per el web
Comment[cs]=ProhlÞenàstránek World Wide Webu
Comment[de]=Im Internet surfen
Comment[el]=ÃŽ εÃÂιηγηà ŽÂ¸ÃŽÂµÃŽÂ¯Ã„ε ÃÄον ÀαγκÌà ŽÂ¼ÃŽÂ¹ÃŽÂ¿ ιÃÄÃÂŒ
Comment[es]=Navegue por la web
Comment[fa]=صÙÂØÂات شبکه جهانی اینتر٠†Ã˜Âª را مرور نماییØ ¯
Comment[fi]=Selaa Internetin www-sivuja
Comment[fr]=Navigue sur Internet
Comment[hu]=A világháló böngészése
Comment[it]=Esplora il web
Comment[ja]=ウェブã‚ ’閲覧ã—㠾ã™
Comment[ko]=웹ì„ ëŒ아 다닙니ë‹ ¤
Comment[nb]=Surf på nettet
Comment[nl]=Verken het internet
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegue na Internet
Comment[pt_BR]=Navegue na Internet
Comment[sk]=Prehliadanie internetu
Comment[sv]=Surfa på webben
GenericName=Web Browser
GenericName[bg]=Ã˜Ã½Ñ‚ÃµÑ€à ½ÃµÑ‚ ñрðу÷ѠŠÃ‘€
GenericName[ca]=Navegador web
GenericName[cs]=Webový prohlÞeÄÂ
GenericName[el]=ÃŽ εÃÂÎ¹Î·Î³Î·à „Î®Ã‚ ιÃÄοÃÂ
GenericName[es]=Navegador web
GenericName[fa]=مرورگؠ± اینتر٠†Ã˜ÂªÃ›ÂŒ
GenericName[fi]=Webselain
GenericName[fr]=Navigateur Web
GenericName[hu]=Webböngésző
GenericName[it]=Browser Web
GenericName[ja]=ウェブム»Ã£ÂƒÂ–ラウã‚ ¶
GenericName[ko]=웹 브ëÂ¼ìš°ì €
GenericName[nb]=Nettleser
GenericName[nl]=Webbrowser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[sk]=Internetový prehliadaÄÂ
GenericName[sv]=Webbläsare
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox.png
Categories=WebBrowser;Network;
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
StartupWMClass=firefox-bin
StartupNotify=true
" > /usr/share/applications/firefox.desktop
fi
exit
http://www.xs4all.nl/~beukrode/yamal/install_iceweasel&FF3.sh
Edit: removed newbie warning, since this is essentially a simple script.