Portaal Portaal Pingviini veeb foorumi pealeht
  Viki  |  IRC  |  Otsing  |  Küsimused ja vastused  |  Profiil  |  Privaatsõnumite vaatamiseks logi sisse  | Logi sisse või Registreeru
<empty>
Vaata järgmist teemat
Vaata eelmist teemat

Postita uus teemaVasta teemale
Autor Sõnum
spott
Admin
Admin


Vanus: 43
Liitunud: 04.06.2005
Postitused: 8853

Distributsioon: Ubuntu
estonia.gif
postituspostitatud: 13.12.2006, 17:09  postituse pealkiri:  Firefox 2.0 Ubuntu Dapperis  

Nagu teada on Ubuntu Dapperis endiselt Mozilla Firefoxi 1.5 versioon. Ma ei soovi stabiilsuse tõttu uuendada läpakal Ubuntu 6.10 peale, kuna suurel arvutil sellega üsna halvad kogemused. Küll aga soovin kasutada uusimat Firefoxi. Sai siis otsitud lahendust oma probleemile ja leidsin sellise veebilehe:
http://www.psychocats.net/ubuntu/firefox
Seal oleval skriptil on aga üks puudus. Nimelt minul ei hakanud küll tööle vastav Localisatsiooni osa. Ehk - skript polnud võimeline töötama. Nii viisin sisse mõningad muudatused:
Kood:

#!/bin/bash
#
# installnewfirefox.sh
#               Script to automatically download and install the newest firefox version for linux, on an Ubuntu system.
#               Requires an internet connection to work (obviously).
#
# Author:       nanotube <nanotube@users.sf.net>.
#               
# Version:      installnewfirefox.sh  2.14  11-Nov-2006  nanotube@users.sf.net
#
#
#######

## Make sure that we exit if any commands do not complete successfully.
set -o errexit
trap 'echo "Previous command did not complete successfully. Exiting."' ERR

## Set version-specific variables
if grep -q "5.10" /etc/issue ; then
  PLUGINPATH=/usr/lib/mozilla-firefox/plugins
elif grep -q "6.06" /etc/issue ; then
  PLUGINPATH=/usr/lib/firefox/plugins
elif grep -q "6.10" /etc/issue ; then
  PLUGINPATH=/usr/lib/firefox/plugins
else
  echo "This script only works on Breezy, Dapper, or Edgy."
  exit 1
fi

## Get the newest firefox release version from mozilla website
VERSION=`wget -q -O - http://www.mozilla.com |grep "product=" -m 1 |sed -e 's/.*<li>.*firefox-//' -e 's/&amp.*//'`

echo -e -n "The most recent release of firefox is detected to be $VERSION. Please make sure this is correct before proceeding. (You can confirm by going to http://www.mozilla.com/) Is it correct [y/n]? "
while true
do
  read ans
  case $ans in
        Y|y|[Yy][Ee][Ss])
            break ;;
        N|n|[Nn][Oo])
            echo "If this does not agree with the latest version as listed on mozilla.com, please contact nanotube@users.sf.net and let me know.";
            exit ;;
        *)
            echo -n "Invalid command. Please answer yes or no [y/n] " ;;
  esac
done

echo -e "\nUpdating repositories list\n"
sudo aptitude update

echo -e "\nMaking sure libstdc++5 and the old Firefox are installed\n"
sudo aptitude install firefox libstdc++5

if [ -d ~/.mozilla ]; then
  echo -e "\nBacking up old Firefox preferences\n"
  cp -R ~/.mozilla ~/.mozilla_backup_`date -Iseconds`
else
  echo -e "\nOld firefox preferences not found. Nothing to back up. Proceeding with installation.\n"
fi

echo -e "\nChanging to home directory\n"
cd

echo -e "\nDownloading Firefox archive from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/en-US/firefox-$VERSION.tar.gz

echo -e -n "The next step will verify the GPG signature for the firefox archive to assure its integrity. This step is important for your security. However, if you have problems getting this to work right, you may choose 'no' and proceed to installation without signature verification. Do you want to verify the signature [y/n]?"
while true
do
  read ans
  case $ans in
        Y|y|[Yy][Ee][Ss])
            echo -e "\nDownloading Firefox signature from the Mozilla site\n"
            wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/en-US/firefox-$VERSION.tar.gz.asc

            echo -e "\nImporting Mozilla Software Releases public key\n"
            echo -e "Note that if you have never used gpg before on this system, and this is your first time running this script, there may be a delay of about a minute during the generation of a gpg keypair. This is normal and expected behavior.\n"
            gpg --keyserver subkeys.pgp.net --recv 1AF32821

            echo -e "\nVerifying signature...\nNote: do not worry about \"untrusted key\" warnings. That is normal behavior for newly imported keys.\n"
            gpg --verify firefox-$VERSION.tar.gz.asc firefox-$VERSION.tar.gz
            break ;;
        N|n|[Nn][Oo])
            echo "Proceeding without signature verification..."; break ;;
         *)
            echo -n "Invalid command. Please answer yes or no [y/n] " ;;
  esac
done

echo -e "\nExtracting the downloaded Firefox archive\n"
sudo tar -C /opt -xzf firefox-$VERSION.tar.gz

echo -e "\nRemoving installation file(s) to free up disk space\n"
rm -f firefox-$VERSION.tar.gz firefox-$VERSION.tar.gz.asc

echo -e "\nLinking plugins\n"
sudo mv /opt/firefox/plugins /opt/firefox/plugins_`date -Iseconds`
sudo ln -s -f $PLUGINPATH /opt/firefox/plugins

echo -e "\nLinking launcher to new Firefox\n"
sudo dpkg-divert --divert /usr/bin/firefox.ubuntu --rename /usr/bin/firefox
sudo ln -s -f /opt/firefox/firefox /usr/bin/firefox
sudo dpkg-divert --divert /usr/bin/mozilla-firefox.ubuntu --rename /usr/bin/mozilla-firefox
sudo ln -s -f /opt/firefox/firefox /usr/bin/mozilla-firefox

echo -e "\nThe new Firefox version $VERSION has been installed successfully."

exit

salvestage vastav kood endale installnewfirefox.sh failina. Andke sellele käsuga: chmod +x installnewfirefox.sh käivitamis õigused ja siis käivitage see (tavakasutajana): ./installnewfirefox.sh

Miks eelistada seda skripti versiooni - nimelt sellega saate edasi kasutada Ubuntu enda repositooriumitest paigaldatud pluginaid.

Ühtlasi - võite ka alla laadida valmis minu muudetud faili zip arhiivina.


installnewfirefox.sh.zip
 Kirjeldus:
installnewfirefox.sh arhiiv.

Allalaadimised
 Failinimi:  installnewfirefox.sh.zip
 Failisuurus:  1.87 kB
 Alla laaditud:  441 kord(a)

_________________
Tellige endale sünnipäevaks, sõbrapäevaks või muuks tähtpäevaks kingitus: Kingitused internetist - NetiKink.eu

zeroconf
Vana Pingviin
Vana Pingviin



Liitunud: 31.03.2007
Postitused: 1065


blank.gif
postituspostitatud: 06.05.2007, 17:18  postituse pealkiri:  (teema puudub)  

proovida võib ka sellist skripti:

http://pykeylogger.sourceforge.net/installnewfirefox.sh mis toimis Ubuntu 6.06.1 peal kenasti.




Viimati muutis zeroconf 08.05.2007, 09:00; muudetud 6 korda
spott
Admin
Admin


Vanus: 43
Liitunud: 04.06.2005
Postitused: 8853

Distributsioon: Ubuntu
estonia.gif
postituspostitatud: 06.05.2007, 19:22  postituse pealkiri:  (teema puudub)  

Thunderbirdi skripti panin igaks juhuks ka Pingviini allalaadimistesse.
siin

_________________
Tellige endale sünnipäevaks, sõbrapäevaks või muuks tähtpäevaks kingitus: Kingitused internetist - NetiKink.eu

Näita (aja järgi):      
Postita uus teemaVasta teemale


Vaata järgmist teemat
Vaata eelmist teemat
Powered by phpBB2 Plus based on phpBB © 2001/7 phpBB Group