PDA

View Full Version : Firefox Installation Script Development Thread


aysiu
May 8th, 2006, 12:31 PM
Introduction
Starting with the second post in this thread, nanotube brought to life a sophisticated script translating the many copy-and-paste commands from the Ubuntu Wiki for getting the Mozilla (not Ubuntu) build of Firefox installed.

News
We now have a subforum in the Ubuntu Forums! You're in it right now.

nanotube
May 24th, 2006, 01:28 AM
For the future, you might want to know that I've created a script that automates the Wiki instructions:
http://www.psychocats.net/ubuntu/firefox
by the way, i was looking at your script, and it lacks exit status checking in a big way. it just plods through the wiki instructions. so, for example, say, if the wget fails, it will just keep going on trying to untar, and that will fail, and it will try to do other stuff... in other words, not really smooth. you "should" check the exit status of the command before moving on to the next step.

aysiu
May 24th, 2006, 01:35 AM
by the way, i was looking at your script, and it lacks exit status checking in a big way. it just plods through the wiki instructions. so, for example, say, if the wget fails, it will just keep going on trying to untar, and that will fail, and it will try to do other stuff... in other words, not really smooth. you "should" check the exit status of the command before moving on to the next step. I'm not a programmer, so I don't know how to do that.

The script is open source (after all, I just lifted it straight off the Wiki instructions). Go ahead and modify it as you see fit. I have no doubt that it can be improved--right now, though, it's the easiest way to get 1.5.0.3 on Breezy.

Ideally, it would have these exit things you're talking about. Ideally, it would ask the user what version of Firefox to get (British, American, etc.) and fetch that. Ideally, it would figure out if the mirror it's trying to pull from is dead and pull from another mirror instead.

Right now, though, the only other alternatives are:

Wiki (copy and paste a lot of instructions)
Automatix (install a whole new program and change up your sources.list--not a bad thing at all, but it's a bit more involved)
Upgrade Dapper (extremely involved, possibly resulting in a lot of breakage)

In other words, it's the best at what it does right now. If you want to make it better, I'm all for it!

nanotube
May 24th, 2006, 11:30 AM
I'm not a programmer, so I don't know how to do that.

The script is open source (after all, I just lifted it straight off the Wiki instructions). Go ahead and modify it as you see fit. I have no doubt that it can be improved--right now, though, it's the easiest way to get 1.5.0.3 on Breezy.

Ideally, it would have these exit things you're talking about. Ideally, it would ask the user what version of Firefox to get (British, American, etc.) and fetch that. Ideally, it would figure out if the mirror it's trying to pull from is dead and pull from another mirror instead.

Right now, though, the only other alternatives are:

Wiki (copy and paste a lot of instructions)
Automatix (install a whole new program and change up your sources.list--not a bad thing at all, but it's a bit more involved)
Upgrade Dapper (extremely involved, possibly resulting in a lot of breakage)

In other words, it's the best at what it does right now. If you want to make it better, I'm all for it!
heh ok, i will take a crack at it and see what comes out! :)

aysiu
May 24th, 2006, 11:41 AM
heh ok, i will take a crack at it and see what comes out! :) Thanks.

I'm wondering how much demand there will be for it in a week, though.

Do you think people would be cool with Ubuntu's Firefox as long as they use the "take back the Firefox logo" script? Or would they, for some other reason, want the official Mozilla version anyway?

nanotube
May 24th, 2006, 02:31 PM
Thanks.

I'm wondering how much demand there will be for it in a week, though.

Do you think people would be cool with Ubuntu's Firefox as long as they use the "take back the Firefox logo" script? Or would they, for some other reason, want the official Mozilla version anyway?

well, at some point in the future, i'm sure firefox 1.6 or 2.0 will come out, and just like ff15 on breezy now, it will be absent from the dapper repositories, and then everyone will be asking "how come i still have ff 1.5 when on mozilla.org it shows 2.0 is released? how do i install it?" and that's when interest in your firefox install script will be revived anew. :)

also, i am not sure, but if ubuntu makes some changes to the official ubuntu firefox, that makes automatic updates through firefox not work correctly, then there might still be reason to use "original" firefox.

and another thing - i, for one, would probably wait until 1 or 2 months have passed since the dapper release, so that most bugs have time to be ironed out. since i use ubuntu on my main workhorse computer, i would hate for anything untoward to ruin the show after an upgrade. i am sure there will be quite a few people thinking the same thing - so maybe there will be some use for ff1.5 install on breely for a few months yet.

so, at any rate, i figure i can use a bit of practice in my bash scripting, no matter what the future has in store for this firefox install script. :)

aysiu
May 24th, 2006, 02:36 PM
so, at any rate, i figure i can use a bit of practice in my bash scripting, no matter what the future has in store for this firefox install script. :) Sounds like as good a reason as any other. Go for it!

nanotube
May 24th, 2006, 11:59 PM
Sounds like as good a reason as any other. Go for it!
well, i went for it. :) here is the result:
#!/bin/bash
check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully."
exit 1
fi
}

echo -e "Updating repositories list\n"
sudo apt-get update
check_exit_status

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

echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status

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

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

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s /usr/lib/mozilla-firefox/plugins/* .
check_exit_status

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

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

exit

basically, all i did was create a check_exit_status function that checks if the previous command has completed successfully, and invoked it after every command that the script performs.

i also changed your multiline echo-s to single-line commands, by shoving in explicit \n-s and using "echo -e" so that they are interpreted correctly.

feel free to post this on your website in replacement of your original script. (a credit to me would be appreciated. :) )

and another note of warning - since my firefox new version is already installed, i did not actually run the script to test it - so it "may" have some undetected typos.

aysiu
May 25th, 2006, 12:12 AM
Thanks, nanotube.

I'm going to do some extensive testing on my test Ubuntu box before posting it.

I also want to see if my uninstall script will work with your revised install script, too.

nanotube
May 25th, 2006, 12:19 AM
Thanks, nanotube.

I'm going to do some extensive testing on my test Ubuntu box before posting it.

I also want to see if my uninstall script will work with your revised install script, too.
ah, testing is good. especially before passing it on to a bunch of unsuspecting users :)

hm, the uninstall should work just as well, since no changes have been made to the "meat" of the install script. but i suppose it doesnt hurt to check...

nanotube
May 25th, 2006, 01:53 AM
made another addition to the script - a verification of the gpg key for the firefox tarball. always good to check integrity of the download.

also added a -f flag to rm, for good measure.

anyway, here is the updated script:

#!/bin/bash
check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully."
exit 1
fi
}

echo -e "Updating repositories list\n"
sudo apt-get update
check_exit_status

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

echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status

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

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

echo -e "\nDownloading Firefox signature from the Mozilla site\n"
wget -c http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/1.5.0.3/linux-i686/en-US/firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nImporting Mozilla Software Releases public key\n"
gpg --keyserver subkeys.pgp.net --recv 1AF32821
check_exit_status

echo -e "\nVerifying signature\n"
gpg --verify firefox-1.5.0.3.tar.gz.asc firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-1.5.0.3.tar.gz firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s /usr/lib/mozilla-firefox/plugins/* .
check_exit_status

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

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

exit

aysiu
May 25th, 2006, 02:21 AM
Okay, I've got the first bug.

I tested it on a fresh Breezy Ubuntu, and it exits because it cannot backup the non-existent /home/username/.mozilla folder when it's trying to back up the existing profile.

Since it's a fresh install, there is no .mozilla folder. I don't think this should make the script stop. It should produce and error and then just keep proceeding.

Another thing--as far as I can tell, Breezy uses /usr/lib/mozilla-firefox/plugins for plugins, but Dapper uses /usr/lib/firefox/plugins.

So, if the script gets updated for Dapper, that line should be changed.

nanotube
May 25th, 2006, 11:46 AM
hmm, ok, well, here is the new script, addressing both concerns:

#!/bin/bash
check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully."
exit 1
fi
}

if grep -q "Breezy" /etc/issue ; then
PLUGINPATH=/usr/lib/mozilla-firefox/plugins
elif grep -q "Dapper" /etc/issue ; then
PLUGINPATH=/usr/lib/firefox/plugins
else
echo "This script only works on Breezy or Dapper."
exit 1
fi

echo -e "Updating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

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

echo -e "\nDownloading Firefox signature from the Mozilla site\n"
wget -c http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/1.5.0.3/linux-i686/en-US/firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nImporting Mozilla Software Releases public key\n"
gpg --keyserver subkeys.pgp.net --recv 1AF32821
check_exit_status

echo -e "\nVerifying signature\n"
gpg --verify firefox-1.5.0.3.tar.gz.asc firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-1.5.0.3.tar.gz firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit

added a test for ubuntu version, which sets plugin directory accordingly, as well as a test for existence of ~/.mozilla before attempting to copy it (and proceeding if it doesn't exist).

aysiu
May 25th, 2006, 12:18 PM
Whoa! Awesome response time! I'll test the new script out tonight.

The script is almost perfect, thanks to your hard work.

The next step to make it perfect would be to have it download the language version of choice and also pick a different mirror if the mirror it's trying to draw from is down.

That's a big next step, though.

Let me test out what you've written so far. More later...

nanotube
May 25th, 2006, 01:41 PM
Whoa! Awesome response time! I'll test the new script out tonight.

The script is almost perfect, thanks to your hard work.

The next step to make it perfect would be to have it download the language version of choice and also pick a different mirror if the mirror it's trying to draw from is down.

That's a big next step, though.

Let me test out what you've written so far. More later...
hmm, well, the choice of language version should be fairly straightforward to code in. i will give it a crack tonight (or maybe tomorrow). so would the choosing of a different mirror in case of failure - if i had a list of mirrors. i kinda thought that the ftp-mozilla.netscape.com automatically passed through the requests to a bunch of mirrors, but maybe i'm wrong?

aysiu
May 25th, 2006, 01:46 PM
hmm, well, the choice of language version should be fairly straightforward to code in. i will give it a crack tonight (or maybe tomorrow). so would the choosing of a different mirror in case of failure - if i had a list of mirrors. i kinda thought that the ftp-mozilla.netscape.com automatically passed through the requests to a bunch of mirrors, but maybe i'm wrong? You know, maybe you should host this--the new script you've created is way beyond me. I think once we finish testing it, you should put it up on your keylogger site, and I'll just link to it from Psychocats.

nanotube
May 25th, 2006, 01:51 PM
You know, maybe you should host this--the new script you've created is way beyond me. I think once we finish testing it, you should put it up on your keylogger site, and I'll just link to it from Psychocats.

it's all the same to me. since you are doing the testing, and since you made the original script, you have just as much claim on this script as i do. so don't worry. ;)

oh and btw, so do you know about a list of official mirrors for firefox? i looked around on mozilla.org/com, and couldn't find it. only site i've seen is one we download from already...

aysiu
May 25th, 2006, 01:57 PM
it's all the same to me. since you are doing the testing, and since you made the original script, you have just as much claim on this script as i do. so don't worry. ;) That's very funny, nanotube.

I hardly have any claim to this script. "My" script is basically just #!/bin/bash with the Wiki instructions pasted in one after the other and a wget command.

Your script is a fully functional script that includes programming and syntax created by you.

While I would be able to modify my script (and I have) when people have told me about problems with it, your script is way beyond my editing capabilities, so it would be up to you to maintain--thus, it would make sense to host it on your site.

I will probably post up something like: This script has been improved upon and moved. It now lives here [link to your site]. Here are the differences between the new script and the old script [list of changes]. If you still want to use the old script, for whatever strange reason, here it is [link to my script]. Otherwise, please use the new script [link to your script], which is smarter and will be updated as needed.


oh and btw, so do you know about a list of official mirrors for firefox? i looked around on mozilla.org/com, and couldn't find it. only site i've seen is one we download from already... http://www.mozilla.org/mirrors.html

nanotube
May 25th, 2006, 02:24 PM
That's very funny, nanotube.

I hardly have any claim to this script. "My" script is basically just #!/bin/bash with the Wiki instructions pasted in one after the other and a wget command.

Your script is a fully functional script that includes programming and syntax created by you.

While I would be able to modify my script (and I have) when people have told me about problems with it, your script is way beyond my editing capabilities, so it would be up to you to maintain--thus, it would make sense to host it on your site.

oh no, maintenance! what have i gotten myself into??? :mrgreen: :D

still, i think you underplay your contribution - first, you had the initiative and the foresight to actually make a script out of it (i don't see anyone else who did). second, testing is nothing to scoff at, either (it's an important part of any piece of code). neither is #!/bin/bash. :)


I will probably post up something like: ...

well if you insist, sure, that would be fine. i'd still appreciate your testing the script, before we post it up for "general consumption". :)


http://www.mozilla.org/mirrors.html
ah, thanks! i notice also that it says "Note: when you connect to ftp.mozilla.org, you are connecting to one of the United States mirrors."
so we will just change our wgets to go to ftp.mozilla.org, and all the mirroring will be taken care of by load balancing magic. a bunch of US mirrors ought to be good enough, methinks?

aysiu
May 25th, 2006, 02:48 PM
oh no, maintenance! what have i gotten myself into??? :mrgreen: :D I think that's a question we all ask ourselves sometimes.


still, i think you underplay your contribution - first, you had the initiative and the foresight to actually make a script out of it (i don't see anyone else who did). second, testing is nothing to scoff at, either (it's an important part of any piece of code). neither is #!/bin/bash. :) Well, in all fairness, Automatix does install Firefox. I created the script because I wanted something a little less committal. If people had all the plugins they wanted and such, I didn't want to have to tell them "Install Automatix" just to get the latest Firefox, too.

As with the Add-On CD project (which seems to be in hibernation right now), I'm a big fan of the philosophy, "We need a good way to do X. But if no one is going to do X well, I'll do X terribly just so we'll have it!"


well if you insist, sure, that would be fine. i'd still appreciate your testing the script, before we post it up for "general consumption". :) I'll do extensive testing in the next 24-hours.


ah, thanks! i notice also that it says "Note: when you connect to ftp.mozilla.org, you are connecting to one of the United States mirrors."
so we will just change our wgets to go to ftp.mozilla.org, and all the mirroring will be taken care of by load balancing magic. a bunch of US mirrors ought to be good enough, methinks? Cool. I guess you can hold off on the European ones for now. Or, if you get tired of maintaining the project, maybe someone else will take up the reins.

aysiu
May 25th, 2006, 03:14 PM
I'm going to test this, which is basically your last script but using ftp.mozilla.org: #!/bin/bash
check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully."
exit 1
fi
}

if grep -q "Breezy" /etc/issue ; then
PLUGINPATH=/usr/lib/mozilla-firefox/plugins
elif grep -q "Dapper" /etc/issue ; then
PLUGINPATH=/usr/lib/firefox/plugins
else
echo "This script only works on Breezy or Dapper."
exit 1
fi

echo -e "Updating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

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

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

echo -e "\nImporting Mozilla Software Releases public key\n"
gpg --keyserver subkeys.pgp.net --recv 1AF32821
check_exit_status

echo -e "\nVerifying signature\n"
gpg --verify firefox-1.5.0.3.tar.gz.asc firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-1.5.0.3.tar.gz firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit

nanotube
May 25th, 2006, 03:30 PM
the one you posted is not the last - it is missing the gpg signature verification code, and the ubuntu version checking code.
this would be the last one, with ftp.mozilla.org:

#!/bin/bash
check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully."
exit 1
fi
}

if grep -q "Breezy" /etc/issue ; then
PLUGINPATH=/usr/lib/mozilla-firefox/plugins
elif grep -q "Dapper" /etc/issue ; then
PLUGINPATH=/usr/lib/firefox/plugins
else
echo "This script only works on Breezy or Dapper."
exit 1
fi

echo -e "Updating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

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

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

echo -e "\nImporting Mozilla Software Releases public key\n"
gpg --keyserver subkeys.pgp.net --recv 1AF32821
check_exit_status

echo -e "\nVerifying signature\n"
gpg --verify firefox-1.5.0.3.tar.gz.asc firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-1.5.0.3.tar.gz firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit

edit: whoops, i guess you edited yours to reflect the newest code while i was typing my message here. :)

nanotube
May 25th, 2006, 03:32 PM
I'll do extensive testing in the next 24-hours.

cool, thanks.


Cool. I guess you can hold off on the European ones for now. Or, if you get tired of maintaining the project, maybe someone else will take up the reins.
well, i can always throw in a prompt that asks people that if they are in europe, they can select one of the european mirrors - do you think that would make a difference? i always figure, us mirrors should work for europeans just as well...

aysiu
May 25th, 2006, 03:40 PM
cool, thanks. Okay. I just tested it with a .mozilla folder and without one. It works!

Only two issues:

1. I'm not sure if this is because I'm using a VMWare Ubuntu right now, but my /etc/issue says: Ubuntu 6.06 LTS \n \l, so the first time I tried to run it, I was told the script was for only Breezy or Dapper. So I modified my /etc/issue file, so I could test the rest of the script. Maybe one of the strings you could check for would also be 6.06 or 5.10?

2. The first time I ran the script, the script stalled for a while at this part: gpg: directory `/home/username/.gnupg' created
gpg: new configuration file `/home/username/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/username/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/username/.gnupg/secring.gpg' created
gpg: keyring `/home/username/.gnupg/pubring.gpg' created
The second time, it flew right through. It may be a good idea to create some kind of a warning to say "If this is your first time using this script, this may take a while--don't worry." I think I waited a good thirty seconds.


well, i can always throw in a prompt that asks people that if they are in europe, they can select one of the european mirrors - do you think that would make a difference? i always figure, us mirrors should work for europeans just as well... I'm not sure if it's a mirror issue or if the British version of Firefox, for example, is different in some way (I don't know). I'm thinking of the part of the address that's en-US as opposed to en-GB or whatever else it could be.

nanotube
May 25th, 2006, 03:51 PM
Okay. I just tested it with a .mozilla folder and without one. It works!

Only two issues:

1. I'm not sure if this is because I'm using a VMWare Ubuntu right now, but my /etc/issue says: Ubuntu 6.06 LTS \n \l, so the first time I tried to run it, I was told the script was for only Breezy or Dapper. So I modified my /etc/issue file, so I could test the rest of the script. Maybe one of the strings you could check for would also be 6.06 or 5.10?

ah hmm, i guess its not "dapper" until it is released :) i suppose checking for the version number would be more portable, so we will do that, instead.


2. The first time I ran the script, the script stalled for a while at this part: gpg: directory `/home/username/.gnupg' created
gpg: new configuration file `/home/username/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/username/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/username/.gnupg/secring.gpg' created
gpg: keyring `/home/username/.gnupg/pubring.gpg' created
The second time, it flew right through. It may be a good idea to create some kind of a warning to say "If this is your first time using this script, this may take a while--don't worry." I think I waited a good thirty seconds.

ah well yea, it had to create some keypairs, i suppose. ok, we will make that note.


I'm not sure if it's a mirror issue or if the British version of Firefox, for example, is different in some way (I don't know). I'm thinking of the part of the address that's en-US as opposed to en-GB or whatever else it could be.

well, the en-US vs en-GB part is the localization, an issue that is separate from the mirroring issue, because the entire directory tree is mirrored on all mirrors, so any localized version can be gotten from any mirror. and yes, i am planning on offering the user a choice of localization for the download, as well (as we mentioned some post ago).

thanks for the testing, those are some issues that one certainly wouldn't pick up without actually running the whole script on a fresh machine :)

aysiu
May 25th, 2006, 04:00 PM
I have yet to test it on a Breezy box, but I'll do that later. If I test it on Breezy, and it's good, do you want to go ahead and post it on your keylogger site and give me the link?

nanotube
May 25th, 2006, 04:14 PM
I have yet to test it on a Breezy box, but I'll do that later. If I test it on Breezy, and it's good, do you want to go ahead and post it on your keylogger site and give me the link?

sure, will do.
in the meantime, here is the "newest" version of the script, with the extra warning message about gpg, and usage of version numbers rather than version names. pretty minor changes, but just for the record:

#!/bin/bash
check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully. Exiting."
exit 1
fi
}

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
else
echo "This script only works on Breezy or Dapper."
exit 1
fi

echo -e "Note that if you have never used gpg before on this system, and this is your first time running this script, there will be a delay of about a minute during the generation of a gpg keypair. This is normal and expected behavior.\n"

echo -e "\nUpdating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

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

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

echo -e "\nImporting Mozilla Software Releases public key\n"
gpg --keyserver subkeys.pgp.net --recv 1AF32821
check_exit_status

echo -e "\nVerifying signature\n"
gpg --verify firefox-1.5.0.3.tar.gz.asc firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-1.5.0.3.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-1.5.0.3.tar.gz firefox-1.5.0.3.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit

nanotube
May 25th, 2006, 07:35 PM
just let me know when you are done testing on breezy, and i will throw it up on my site. :)

aysiu
May 25th, 2006, 09:44 PM
It works on Breezy! Congratulations!

The signature thing didn't take long and I didn't get this warning: Note that if you have never used gpg before on this system, and this is your first time running this script, there will be a delay of about a minute during the generation of a gpg keypair. This is normal and expected behavior Does that mean your script detects whether or not the system has used gpg before? I'm not sure whether my Breezy installation has used it before or not.

This might be a little disconcerting to a new user, though: Importing Mozilla Software Releases public key

gpg: directory `/home/username/.gnupg' created
gpg: new configuration file `/home/username/.gnupg/gpg.conf' created
gpg: WARNING: options in `/home/username/.gnupg/gpg.conf' are not yet active during this run
gpg: keyring `/home/username/.gnupg/secring.gpg' created
gpg: keyring `/home/username/.gnupg/pubring.gpg' created
gpg: requesting key 1AF32821 from hkp server subkeys.pgp.net
gpg: /home/username/.gnupg/trustdb.gpg: trustdb created
gpg: key 0E3606D9: public key "Mozilla Software Releases <releases@mozilla.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1

Verifying signature

gpg: Signature made Tue 02 May 2006 02:39:47 AM PDT using DSA key ID 1AF32821
gpg: Good signature from "Mozilla Software Releases <releases@mozilla.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: F57F 372A 8C6D 4F55 72DE C9B9 696E 3431 0E36 06D9
Subkey fingerprint: 22D5 FEAF D70A 8E29 E999 4ABC C660 CCE2 1AF3 2821 Is that normal?

nanotube
May 25th, 2006, 10:02 PM
don't know why you didnt get that warning.. are you sure you used the version of the script that had it? it is a simple echo statement, that gets executed all the time, so if it was there, you /should/ have gotten it.

as to the key being "not trusted", that is all normal - you have to jump through a bunch of hoops to convince gpg that a key is actually trusted. :)

aysiu
May 25th, 2006, 10:06 PM
don't know why you didnt get that warning.. are you sure you used the version of the script that had it? it is a simple echo statement, that gets executed all the time, so if it was there, you /should/ have gotten it. I'm sorry--the warning did appear--it just appeared a lot earlier, so I didn't notice it. It's weird that it didn't pause for a long time on this go-round, though.


as to the key being "not trusted", that is all normal - you have to jump through a bunch of hoops to convince gpg that a key is actually trusted. :) Maybe another echo statement just telling people not to worry if they see "not trusted"? I know it sounds like a lot of warnings, but that could definitely freak people out...

nanotube
May 25th, 2006, 10:54 PM
hmm, well, here is a link to the new install firefox section on my site:
http://pykeylogger.sourceforge.net/wiki/index.php/Ubuntu:Chronicles#Install_Firefox_1.5
the direct link to the script is
http://pykeylogger.sourceforge.net/installnewfirefox.sh

(extra message about untrusted keys added)

so, for the "near future", i am thinking we need to add the following:
- user selection of localization
- autoselection of latest firefox version (so i dont have to update the script every time a new firefox update comes out.

am i forgetting anything else?

aysiu
May 25th, 2006, 11:29 PM
hmm, well, here is a link to the new install firefox section on my site:
http://pykeylogger.sourceforge.net/wiki/index.php/Ubuntu:Chronicles#Install_Firefox_1.5
the direct link to the script is
http://pykeylogger.sourceforge.net/installnewfirefox.sh

(extra message about untrusted keys added) Thanks, nanotube. I've updated my page to link to yours. I may still point people to my page just because the URL is easier to remember--I don't think they'll mind the extra click to get to yours.

I also appreciate the acknowledgement, but it's not really necessary, since you did most of the hard work.

Maybe you can thank me for testing in the comments of the script instead of mentioning me on the main page?


so, for the "near future", i am thinking we need to add the following:
- user selection of localization
- autoselection of latest firefox version (so i dont have to update the script every time a new firefox update comes out.

am i forgetting anything else? That sounds like that's about it. Congratulations for making such a great script! I'll definitely be here to help test future versions.

handy
May 26th, 2006, 01:45 AM
What a pleasant interaction aysiu & nanotube.

I really enjoyed the read!

You 2 work really well together.

Thanks! :KS

jared85
May 26th, 2006, 12:02 PM
aysiu & nanotube I commend you both!

Splendid job on the install script. I used it and everything went as smooth as possible!

Thanks for making things so easy :)

cheers to you both!

aysiu
May 26th, 2006, 12:06 PM
In all fairness, nanotube did the bulk of the hard work.

All I did was run the script a few times and write back, "It worked!"

nanotube
May 26th, 2006, 01:17 PM
Thanks, nanotube. I've updated my page to link to yours. I may still point people to my page just because the URL is easier to remember--I don't think they'll mind the extra click to get to yours.

no problem, sounds good :)


I also appreciate the acknowledgement, but it's not really necessary, since you did most of the hard work.

Maybe you can thank me for testing in the comments of the script instead of mentioning me on the main page?

i give you the credit that i think you are due. so unless you have strong objections or something, i'd prefer to keep it the way it is. ;)


That sounds like that's about it. Congratulations for making such a great script! I'll definitely be here to help test future versions.
excellent :). there will certainly be future versions - especially once i am done with my stats comp exam.

nanotube
May 26th, 2006, 01:18 PM
In all fairness, nanotube did the bulk of the hard work.

All I did was run the script a few times and write back, "It worked!"
you also made a lot of good suggestions, had the initial idea to make the script in the first place, and served as a motivator for me to work on it. we made a good team, i'd say. ;)

aysiu
May 26th, 2006, 02:15 PM
We make a good team. I just don't want people to think I wrote that script. Motivator? Okay. Tester? Also okay. I do still believe you did all the hard work, though.

nanotube
May 26th, 2006, 05:28 PM
We make a good team. I just don't want people to think I wrote that script. Motivator? Okay. Tester? Also okay. I do still believe you did all the hard work, though.
heh, well, this must be a rare sight - people trying to give credit to each other over the other's objection :)

i think "in collaboration with" is sufficiently vague to be acceptable under your strict criteria - it does not say "aysiu wrote half the script", it just says that we collaborated while writing it, without specifying the nature of the contribution of either party. but if you would prefer, i can say "in collaboration with aysiu, who helped with testing, ideas, and motivation." would that make you happier? :)

aysiu
May 26th, 2006, 05:37 PM
heh, well, this must be a rare sight - people trying to give credit to each other over the other's objection :)

i think "in collaboration with" is sufficiently vague to be acceptable under your strict criteria - it does not say "aysiu wrote half the script", it just says that we collaborated while writing it, without specifying the nature of the contribution of either party. but if you would prefer, i can say "in collaboration with aysiu, who helped with testing, ideas, and motivation." would that make you happier? :) I can agree on that. Yes, that would make me happier. We finally agree!

I'm just being silly, I guess, but thanks for indulging me.

handy
May 26th, 2006, 07:08 PM
Just point people to this thread, if you want them to know who did what!! :KS

Great Stuff!!

nanotube
May 28th, 2006, 12:23 AM
I can agree on that. Yes, that would make me happier. We finally agree!

I'm just being silly, I guess, but thanks for indulging me.
:D it is done.

nanotube
May 28th, 2006, 02:10 PM
hey aysiu,
please test the new version of the script, when you have a chance. i will upload it to the site once i have your testing results :)
it automatically pulls the newest version, and the available localizations for it, off the mozilla servers, and lets user choose localization.
here is the new and improved script:


#!/bin/bash
#
# Script to automatically download and install the newest firefox version for linux, on an Ubuntu system.
# Requires an internet connection to work (obviously).
#
# Version 1.5, May 28, 2006

#######

check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully. Exiting."
exit 1
fi
}

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
else
echo "This script only works on Breezy or Dapper."
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. Is it correct [y/n]? "
read ans
case $ans in
Y|y) ;;
[Yy][Ee][Ss]) ;;
N|n) exit ;;
[Nn][Oo]) exit ;;
*) echo "Invalid command"; exit;;
esac

## Get available localizations
LOCALIZATIONS=( `wget -q -O - http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/ | grep 'img src="/icons/folder.gif"' | grep -v "xpi" | sed -e 's/<img.*href="//' | sed -e 's@/">.*@@'` )
# for i in $TEST; do echo $i; done

LIMIT=${#LOCALIZATIONS }

## Get user choice of localization

echo "Please choose the localization (language) for firefox. Enter the number of your choice from the list below."
for ((i=0; i < LIMIT ; i++)) # Double parentheses, and "LIMIT" with no "$".
do
echo "$i: ${LOCALIZATIONS[$i]}"
done

CHOICE=$(($LIMIT + 1))

echo -n "Enter your choice of localization: "
while [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]
do
read CHOICE
if echo -n "$CHOICE" | grep -q "[^0-9]"; then
echo -n "Your input contains non-numeric characters. Please try again: "
CHOICE=$(($LIMIT + 1))
continue
fi
if [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]; then
echo -n "Your input is not in the range of available localizations. Please try again: "
fi
done

echo -n "You have chosen localization \"${LOCALIZATIONS[$CHOICE]}\". Is that correct [y/n]? "
read ans
case $ans in
Y|y) ;;
[Yy][Ee][Ss]) ;;
N|n) exit ;;
[Nn][Oo]) exit ;;
*) echo "Invalid command"; exit;;
esac


echo -e "\nUpdating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

echo -e "\nDownloading Firefox from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nDownloading Firefox signature from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz.asc
check_exit_status

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 will 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
check_exit_status

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
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-$VERSION.tar.gz firefox-$VERSION.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit


edit: added more input checking on the localizations choice.

aysiu
May 29th, 2006, 12:01 AM
Sounds awesome! You work very quickly.

How will I know if it's pulling the latest version... ? We probably won't be able to do full testing on that until 1.5.0.4 or 2.0 comes out.

But I can test the choice of locale. When I'm done testing, I'll post back to this thread to let you know.

nanotube
May 29th, 2006, 01:41 AM
Sounds awesome! You work very quickly.

How will I know if it's pulling the latest version... ? We probably won't be able to do full testing on that until 1.5.0.4 or 2.0 comes out.

But I can test the choice of locale. When I'm done testing, I'll post back to this thread to let you know.

heh well, you will know because if you look at the script, and search for "1.5.0.3", you won't find it hard coded anywhere - because it is getting the info from the website. so if it does in fact download 1.5.0.3, then you will know it works - because otherwise it wouldn't know what to get. :)

edit: and another note on the testing: try inputting a bunch of 'bad' stuff when it asks you things, and make sure that it doesn't get by input checking.

aysiu
May 29th, 2006, 02:08 AM
heh well, you will know because if you look at the script, and search for "1.5.0.3", you won't find it hard coded anywhere - because it is getting the info from the website. so if it does in fact download 1.5.0.3, then you will know it works - because otherwise it wouldn't know what to get. :)

edit: and another note on the testing: try inputting a bunch of 'bad' stuff when it asks you things, and make sure that it doesn't get by input checking. I'll report back after I try the bad stuff, but I'll tell you right now that it did detect 1.5.0.3 as the latest, and if you select English and American as the locale, then it works.

nanotube
May 29th, 2006, 02:28 AM
I'll report back after I try the bad stuff, but I'll tell you right now that it did detect 1.5.0.3 as the latest, and if you select English and American as the locale, then it works.
cool :) try installing like a spanish version (or whatever other language you may be at least passingly familiar with), and see if that gets the spanish firefox up, too.

aysiu
May 29th, 2006, 01:44 PM
cool :) try installing like a spanish version (or whatever other language you may be at least passingly familiar with), and see if that gets the spanish firefox up, too. It works, even with Spanish.

I tried to say "no" to 1.5.0.3 being the latest version, and it quit. I think that's okay. Ideally (maybe for the next version of the script), it would offer some way (an email or web address) where the problem can be reported back to you.

I tried to type gibberish in answer to the same question and I got that it was an invalid command, and then it quit... which, again, is not a terrible thing, but ideally it would tell you "Yeah, your answer needs to be yes or no. Try again."

Incidentally, when I typed gibberish for the locale, I did get such a response, so that's working ideally.

Congratulations! Your latest revision works!

nanotube
May 29th, 2006, 02:12 PM
hey
ok, you are right, it should be more graceful when asking for yes/no answers instead of just quitting. here is the new version, that addresses all your suggestions (and thank you very much for those, by the way):


#!/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 1.6 29-May-2006 nanotube@users.sf.net
#
#
#######

check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully. Exiting."
exit 1
fi
}

## 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
else
echo "This script only works on Breezy or Dapper."
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) break ;;
[Yy][Ee][Ss]) break ;;
N|n) 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 ;;
[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

## Get available localizations
LOCALIZATIONS=( `wget -q -O - http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/ | grep 'img src="/icons/folder.gif"' | grep -v "xpi" | sed -e 's/<img.*href="//' | sed -e 's@/">.*@@'` )

LIMIT=${#LOCALIZATIONS }

## Get user choice of localization

echo "Please choose the localization (language) for firefox. Enter the number of your choice from the list below."
for ((i=0; i < LIMIT ; i++))
do
echo "$i: ${LOCALIZATIONS[$i]}"
done

CHOICE=$(($LIMIT + 1))

echo -n "Enter your choice of localization: "
while [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]
do
read CHOICE
if echo -n "$CHOICE" | grep -q "[^0-9]"; then
echo -n "Your input contains non-numeric characters. Please try again: "
CHOICE=$(($LIMIT + 1))
continue
fi
if [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]; then
echo -n "Your input is not in the range of available localizations. Please try again: "
fi
done

echo -n "You have chosen localization \"${LOCALIZATIONS[$CHOICE]}\". Is that correct [y/n]? "
while true
do
read ans
case $ans in
Y|y) break ;;
[Yy][Ee][Ss]) break ;;
N|n) echo "In that case, start over by running this script again."; exit ;;
[Nn][Oo]) echo "In that case, start over by running this script again."; exit ;;
*) echo -n "Invalid command. Please answer yes or no [y/n] " ;;
esac
done

## Proceed to download and install firefox.

echo -e "\nUpdating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

echo -e "\nDownloading Firefox from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nDownloading Firefox signature from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz.asc
check_exit_status

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 will 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
check_exit_status

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
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-$VERSION.tar.gz firefox-$VERSION.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit


please give it a round or two of testing with invalid inputs and "no"s. (only things i changed were in the user interaction part, so you dont have to let it go through the entire install sequence if you want to save time).

aysiu
May 29th, 2006, 09:23 PM
The revision works flawlessly.

nanotube
May 29th, 2006, 11:13 PM
The revision works flawlessly.
great! thanks for all your help :)

nanotube
May 29th, 2006, 11:28 PM
for the record, here is the newest version of the script (i also corrected the error that it would spit out because it couldn't handle empty input for localization choice correctly.


#!/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 1.6 29-May-2006 nanotube@users.sf.net
#
#
#######

check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully. Exiting."
exit 1
fi
}

## 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
else
echo "This script only works on Breezy or Dapper."
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) break ;;
[Yy][Ee][Ss]) break ;;
N|n) 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 ;;
[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

## Get available localizations
LOCALIZATIONS=( `wget -q -O - http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/ | grep 'img src="/icons/folder.gif"' | grep -v "xpi" | sed -e 's/<img.*href="//' | sed -e 's@/">.*@@'` )

LIMIT=${#LOCALIZATIONS }

## Get user choice of localization

echo "Please choose the localization (language) for firefox. Enter the number of your choice from the list below."
for ((i=0; i < LIMIT ; i++))
do
echo "$i: ${LOCALIZATIONS[$i]}"
done

CHOICE=$(($LIMIT + 1))

echo -n "Enter your choice of localization: "
while [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]
do
read CHOICE
if echo -n "$CHOICE" | grep -q "[^0-9]"; then
echo -n "Your input contains non-numeric characters. Please try again: "
CHOICE=$(($LIMIT + 1))
continue
elif [ -z "$CHOICE" ]; then
echo -n "Please enter the number of your choice from the list: "
CHOICE=$(($LIMIT + 1))
continue
elif [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]; then
echo -n "Your input is not in the range of available localizations. Please try again: "
fi
done

echo -n "You have chosen localization \"${LOCALIZATIONS[$CHOICE]}\". Is that correct [y/n]? "
while true
do
read ans
case $ans in
Y|y) break ;;
[Yy][Ee][Ss]) break ;;
N|n) echo "In that case, start over by running this script again."; exit ;;
[Nn][Oo]) echo "In that case, start over by running this script again."; exit ;;
*) echo -n "Invalid command. Please answer yes or no [y/n] " ;;
esac
done

## Proceed to download and install firefox.

echo -e "\nUpdating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

echo -e "\nDownloading Firefox from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nDownloading Firefox signature from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz.asc
check_exit_status

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 will 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
check_exit_status

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
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-$VERSION.tar.gz firefox-$VERSION.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit

aysiu
May 29th, 2006, 11:43 PM
Do you want this tested, or are you just posting it, as you said, "for the record"?

nanotube
May 29th, 2006, 11:46 PM
Do you want this tested, or are you just posting it, as you said, "for the record"?
yea, just for the record. i already tested the "empty input" scenario. ;)

aysiu
May 29th, 2006, 11:51 PM
By the way, you seem to be a programmer (correct me if I'm wrong). Is this how programming works in the "real" world? You start with a simple script and just keep adding improvements and testing them?

nanotube
May 30th, 2006, 12:58 AM
By the way, you seem to be a programmer (correct me if I'm wrong). Is this how programming works in the "real" world? You start with a simple script and just keep adding improvements and testing them?
heh well, as it happens, i am not "a programmer" although i "can program" somewhat. :) but i do hang out with some programmers, and i read stuff about programming because it interests me, and i have also worked as a linux sysadmin for a few years, so i think i can answer your question with a modicum of thuthfulness. (but at this point i am a grad student in finance, so... no, i am not a programmer, or a even sysadmin, at the present time.)

and the answer is, it depends. :) if you are working on a commercial software development project, where the end deliverable is a working piece of software, then this is not the way it works. painting the very broad-brush picture, first you make a more or less detailed plan, which says what kind of stuff your software will do, then you make the basic skeleton framework, and then you add features and flesh it out until your plan is fulfilled.

if you are working in system (or database) administration, though, where your goal is not to deliver a piece of software, but just to automate some parts of your, or others', job, (in other words, the program/script is a means to an end, rather than the end in itself) then yes, this is the way it works. first you make something basic, then you say oh, wouldn't it be nice if it also did that and add it in, and so on.

and yet another if - if you are talking about FOSS software projects, then yes, unlike commercial projects, they do tend to be a "scratch an itch" type of deal, where the programmer first writes something simple, and then it just grows as features are added, etc. you can see a lot of actual examples of this happening if you just read some of the "project of the month" interviews on sourceforge :)

so to sum up, in the "real world" of system administration, this is the way it tends to work, in the "real world" of FOSS development, this is also the way it tends to work, but in the "real world" of commercial software development, it is not, or at least should not be, the way it works.

and of course, if any actual programmers read this thread, they can feel free to disagree if i am wrong ;)

aysiu
May 30th, 2006, 11:34 AM
Nanotube, thanks for the explanation. That makes sense.

drpaul
May 30th, 2006, 01:15 PM
Don't know if you interested in other experiences, but here goes.

I have the Ubuntu FF installed normally. I have the Mozilla 1.5.0.3 installed in /opt, but have to run it with sudo/gksudo for it to work. I decided to try your script [copied out of the latest (I think) code window]. My sources file has some added stuff to get non-Ubuntu apps, and the script didn't get far. I don't think that the errors encountered are really relevent to the FF install issue, but then, I don't really know.

paul@paulsbox:~$ ./ffupdate.sh
The most recent release of firefox is detected to be 1.5.0.3. Please make sure this is correct before proceeding. (You can confirm by going to http://www.mozilla.com/) Is it correct [y/n]? y
Please choose the localization (language) for firefox. Enter the number of your choice from the list below.
0: ar
1: bg
2: ca
3: cs
4: da
5: de
6: el
7: en-GB
8: en-US
9: es-AR
10: es-ES
11: eu
12: fi
13: fr
14: ga-IE
15: gu-IN
16: he
17: hu
18: it
19: ja
20: ko
21: mk
22: nb-NO
23: nl
24: pa-IN
25: pl
26: pt-BR
27: ro
28: ru
29: sk
30: sl
31: sv-SE
32: tr
33: zh-CN
34: zh-TW
Enter your choice of localization: 8
You have chosen localization "en-US". Is that correct [y/n]? y

Updating repositories list

Password:
Ign http://wine.sourceforge.net binary/ Release.gpg
Hit http://wine.sourceforge.net binary/ Release
Get:1 http://kubuntu.org breezy Release.gpg [189B]
Get:2 http://security.ubuntu.com breezy-security Release.gpg [189B]
Get:3 http://archive.ubuntu.com breezy Release.gpg [189B]
Get:4 http://archive.ubuntu.com breezy-updates Release.gpg [189B]
Ign http://people.ubuntu.com ./ Release.gpg
Ign http://theli.free.fr ./ Release.gpg
Hit http://kubuntu.org breezy Release
Get:5 http://archive.ubuntu.com breezy-backports Release.gpg [189B]
Get:6 http://security.ubuntu.com breezy-security Release [27.0kB]
Ign http://deb.opera.com etch Release.gpg
Hit http://archive.ubuntu.com breezy Release
Ign http://people.ubuntu.com ./ Release
Ign http://theli.free.fr ./ Release
Get:7 http://archive.ubuntu.com breezy-updates Release [30.9kB]
Ign http://deb.opera.com etch Release
Ign http://people.ubuntu.com ./ Packages
Get:8 ftp://ftp.free.fr breezy Release.gpg
Hit http://people.ubuntu.com ./ Packages
Ign http://koti.mbnet.fi breezy/ Release.gpg
Ign http://deb.opera.com etch/non-free Packages
Hit http://kubuntu.org breezy/main Packages
Ign http://theli.free.fr ./ Packages
Get:9 http://archive.ubuntu.com breezy-backports Release [19.6kB]
Ign ftp://ftp.free.fr breezy Release.gpg
Hit http://deb.opera.com etch/non-free Packages
Hit http://archive.ubuntu.com breezy/main Sources
Hit http://archive.ubuntu.com breezy/restricted Sources
Hit http://archive.ubuntu.com breezy/universe Sources
Hit http://archive.ubuntu.com breezy/universe Packages
Hit http://archive.ubuntu.com breezy/main Packages
Hit http://archive.ubuntu.com breezy/restricted Packages
Hit http://archive.ubuntu.com breezy/multiverse Packages
Err http://theli.free.fr ./ Packages
404 Not Found
Ign http://koti.mbnet.fi breezy/ Release
Get:10 ftp://ftp.free.fr breezy Release
Get:11 http://security.ubuntu.com breezy-security/main Packages [62.8kB]
Get:12 http://archive.ubuntu.com breezy-updates/main Packages [39.0kB]
Ign http://koti.mbnet.fi breezy/ Packages
Ign ftp://ftp.free.fr breezy Release
Get:13 http://archive.ubuntu.com breezy-updates/restricted Packages [14B]
Get:14 http://archive.ubuntu.com breezy-updates/main Sources [18.6kB]
Get:15 http://archive.ubuntu.com breezy-updates/restricted Sources [14B]
Get:16 http://archive.ubuntu.com breezy-backports/main Packages [14.0kB]
Ign http://koti.mbnet.fi breezy/ Sources
Get:17 ftp://ftp.free.fr breezy/free Packages
Get:18 http://security.ubuntu.com breezy-security/restricted Packages [4458B]
Get:19 http://security.ubuntu.com breezy-security/main Sources [17.7kB]
Get:20 http://archive.ubuntu.com breezy-backports/restricted Packages [14B]
Get:21 http://archive.ubuntu.com breezy-backports/universe Packages [26.1kB]
Get:22 http://security.ubuntu.com breezy-security/restricted Sources [960B]
Get:23 http://archive.ubuntu.com breezy-backports/multiverse Packages [1353B]
Err http://koti.mbnet.fi breezy/ Packages
404 Not Found
Ign ftp://ftp.free.fr breezy/free Packages
Get:24 http://security.ubuntu.com breezy-security/universe Packages [35.7kB]
Get:25 ftp://ftp.free.fr breezy/non-free Packages
Get:26 http://security.ubuntu.com breezy-security/universe Sources [5007B]
Ign http://wine.sourceforge.net binary/ Packages
Err http://koti.mbnet.fi breezy/ Sources
404 Not Found
Hit http://wine.sourceforge.net binary/ Packages
Ign ftp://ftp.free.fr breezy/non-free Packages
Get:27 ftp://ftp.free.fr breezy/free Sources
Ign ftp://ftp.free.fr breezy/free Sources
Get:28 ftp://ftp.free.fr breezy/non-free Sources
Ign ftp://ftp.free.fr breezy/non-free Sources
Hit ftp://ftp.free.fr breezy/free Packages
Hit ftp://ftp.free.fr breezy/non-free Packages
Hit ftp://ftp.free.fr breezy/free Sources
Hit ftp://ftp.free.fr breezy/non-free Sources
Fetched 304kB in 6s (48.3kB/s)
Failed to fetch http://theli.free.fr/packages/breezy/./Packages.gz 404 Not Found
Failed to fetch http://koti.mbnet.fi/~ots/ubuntu/breezy/Packages.gz 404 Not Found
Failed to fetch http://koti.mbnet.fi/~ots/ubuntu/breezy/Sources.gz 404 Not Found
Reading package lists... Done
E: Some index files failed to download, they have been ignored, or old ones used instead.
Previous command did not complete successfully. Exiting.
paul@paulsbox:~$


[I tried to do a code box but ?????]

What do you think the problem is?

Paul

aysiu
May 30th, 2006, 01:21 PM
Failed to fetch http://theli.free.fr/packages/breezy/./Packages.gz 404 Not Found
Failed to fetch http://koti.mbnet.fi/~ots/ubuntu/breezy/Packages.gz 404 Not Found
Failed to fetch http://koti.mbnet.fi/~ots/ubuntu/breezy/Sources.gz 404 Not Found
Reading package lists... Done These repositories are dead. Remove them from your sources.list.

drpaul
May 30th, 2006, 03:33 PM
Thanks for the feedback. I fixed the sources.list file and now it gets to signature verification ending with


13:25:48 (7.39 MB/s) - `firefox-1.5.0.3.tar.gz.asc' saved [186/186]


Importing Mozilla Software Releases public key

Note that if you have never used gpg before on this system, and this is your first time running this script, there will be a delay of about a minute during the generation of a gpg keypair. This is normal and expected behavior.
gpg --keyserver subkeys.pgp.net --recv 1AF32821

Verifying signature...
Note: do not worry about "untrusted key" warnings. That is normal behavior for newly imported keys.

gpg: Signature made Tue 02 May 2006 03:39:47 AM MDT using DSA key ID 1AF32821
gpg: Can't check signature: public key not found
Previous command did not complete successfully. Exiting.

Looking in Synaptic I have gnupg installed. there are lots of other packages referring to gpg, but I don't know if this is the problem.

Looking for help again.

Paul

nanotube
May 30th, 2006, 04:38 PM
hi, i just checked my script
and noticed that somehow a newline got deleted, no the gpg "get key" command was not actually running, but just getting displayed.
i am going to update the script up on the website, go and re-download it again, and run it (but currently the sf.net shell server seems to be down).
in the meantime, here, copy and paste this into a text file, chmod to executable, and run:


#!/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 1.6 29-May-2006 nanotube@users.sf.net
#
#
#######

check_exit_status () {
if [ $? -ne 0 ]; then
echo "Previous command did not complete successfully. Exiting."
exit 1
fi
}

## 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
else
echo "This script only works on Breezy or Dapper."
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) break ;;
[Yy][Ee][Ss]) break ;;
N|n) 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 ;;
[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

## Get available localizations
LOCALIZATIONS=( `wget -q -O - http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/ | grep 'img src="/icons/folder.gif"' | grep -v "xpi" | sed -e 's/<img.*href="//' | sed -e 's@/">.*@@'` )

LIMIT=${#LOCALIZATIONS }

## Get user choice of localization

echo "Please choose the localization (language) for firefox. Enter the number of your choice from the list below."
for ((i=0; i < LIMIT ; i++))
do
echo "$i: ${LOCALIZATIONS[$i]}"
done

CHOICE=$(($LIMIT + 1))

echo -n "Enter your choice of localization: "
while [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]
do
read CHOICE
if echo -n "$CHOICE" | grep -q "[^0-9]"; then
echo -n "Your input contains non-numeric characters. Please try again: "
CHOICE=$(($LIMIT + 1))
continue
elif [ -z "$CHOICE" ]; then
echo -n "Please enter the number of your choice from the list: "
CHOICE=$(($LIMIT + 1))
continue
elif [ "$CHOICE" -gt "$(($LIMIT-1))" -o "$CHOICE" -lt "0" ]; then
echo -n "Your input is not in the range of available localizations. Please try again: "
fi
done

echo -n "You have chosen localization \"${LOCALIZATIONS[$CHOICE]}\". Is that correct [y/n]? "
while true
do
read ans
case $ans in
Y|y) break ;;
[Yy][Ee][Ss]) break ;;
N|n) echo "In that case, start over by running this script again."; exit ;;
[Nn][Oo]) echo "In that case, start over by running this script again."; exit ;;
*) echo -n "Invalid command. Please answer yes or no [y/n] " ;;
esac
done

## Proceed to download and install firefox.

echo -e "\nUpdating repositories list\n"
sudo apt-get update
check_exit_status

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

if [ -d ~/.mozilla ]; then
echo -e "\nBacking up old Firefox preferences\n"
cp -R ~/.mozilla ~/.mozilla_backup
check_exit_status
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
check_exit_status

echo -e "\nDownloading Firefox from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nDownloading Firefox signature from the Mozilla site\n"
wget -c http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/${LOCALIZATIONS[$CHOICE]}/firefox-$VERSION.tar.gz.asc
check_exit_status

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 will 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
check_exit_status

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
check_exit_status

echo -e "\nUnzipping the .tar.gz file\n"
sudo tar -C /opt -x -z -v -f firefox-$VERSION.tar.gz
check_exit_status

echo -e "\nRemoving the unzipped .tar.gz\n"
rm -f firefox-$VERSION.tar.gz firefox-$VERSION.tar.gz.asc
check_exit_status

echo -e "\nLinking plugins\n"
cd /opt/firefox/plugins/
sudo ln -s $PLUGINPATH/* .
check_exit_status

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

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

exit

drpaul
May 30th, 2006, 05:19 PM
Final report:

It failed once again because there were existing link files in the /opt/... plugin directory. I removed them, and everything went to completion. FF now comes up 1.5.0.3!!!!

Don't know how compicated it would be to check to see if the file to be downloaded already exists. That might save someone with a slow link a lot of time if he were working through problems.

Thanks for the great script.

Paul

nanotube
May 30th, 2006, 05:35 PM
Final report:

It failed once again because there were existing link files in the /opt/... plugin directory. I removed them, and everything went to completion. FF now comes up 1.5.0.3!!!!

just wondering... if the previous attempt interrupted at checking of signature, how come there were files in /opt. checking signature comes before unzipping stuff to /opt. was it because of an earlier installation, maybe?


Don't know how compicated it would be to check to see if the file to be downloaded already exists. That might save someone with a slow link a lot of time if he were working through problems.

that is already being done, since we use "wget -c", where -c is "continue". if file already exists, it will exit without downloading anything again. if incomplete file exists,it will continue where it left off.


Thanks for the great script.

you are welcome :)

drpaul
May 30th, 2006, 10:28 PM
NANOTUBE:
Yes, failure was due to an earlier install in /opt.

Thanks, again. This should be most useful since 1.5.0.3 is do much faster than 1.0.8.

Paul

nanotube
May 31st, 2006, 12:35 AM
hey aysiu,
while the sourceforge shell servers are unreachable, i cannot change the script that's up there, so i changed the links to my university account.
so if you could change your psychocats direct link to point there too, that would probably be helpful for people. (or you can just remove the direct link, and let them come to my wiki page, which will in turn direct them to the correct script link.

and ps: drpaul, i'm glad it worked out :)

georgevn
May 31st, 2006, 02:49 AM
is there something wrong with the firefox package, i couldn't see the list, so how can i choose the language?
~/Desktop$ ./installnewfirefox.sh
The most recent release of firefox is detected to be . Please make sure this is correct before proceeding. (You can confirm by going to http://www.mozilla.com/) Is it correct [y/n]? Y
Please choose the localization (language) for firefox. Enter the number of your choice from the list below.
Enter your choice of localization:
Please enter the number of your choice from the list: 1
Your input is not in the range of available localizations. Please try again: 2
Your input is not in the range of available localizations. Please try again:
[1]+ Stopped ./installnewfirefox.sh

nanotube
May 31st, 2006, 10:48 AM
is there something wrong with the firefox package, i couldn't see the list, so how can i choose the language?
looks like for some reason it couldn't retrieve anything from the web.... were you connected to the net at the time? were you using the newest version of the script? (newest version can be found here: http://pykeylogger.sourceforge.net/wiki/index.php/Ubuntu:Chronicles#Install_Firefox_1.5 )

aysiu
June 1st, 2006, 12:34 PM
By the way, I just did a clean reinstall of Dapper and ran your Firefox script (the Thunderbird one worked excellently). I accidentally typed in the wrong locale. When it asked, "Is this the one you want?" and I said "No," the script just quit.

Is there any way you can make it so that it says, "Try again"?

joergenlie
June 1st, 2006, 02:19 PM
Sure. #!/bin/bash
sudo rm /usr/bin/firefox
sudo dpkg-divert --rename --remove /usr/bin/firefox
sudo rm /usr/bin/mozilla-firefox
sudo dpkg-divert --rename --remove /usr/bin/mozilla-firefox
cd
mv .mozilla .mozilla-1.5
mv .mozilla.ubuntu .mozilla
sudo rm -r /opt/firefox Save that code as a text file called removefirefox.sh and save that to your desktop. Then cd ~/Desktop
chmod +x removefirefox.sh
./removefirefox.sh

Well I tried this, but now I dont have any firefox at all. I have it installed but it wont start. says: usr/bin/firefox no such file or directory. I have tried to re-install firefox thru apt but it still wont work. Anyone with this problem, please help. Anyway just upgraded to dapper and it`s just smooth!!

Jørgen Norway

nanotube
June 1st, 2006, 03:44 PM
Well I tried this, but now I dont have any firefox at all. I have it installed but it wont start. says: usr/bin/firefox no such file or directory. I have tried to re-install firefox thru apt but it still wont work. Anyone with this problem, please help. Anyway just upgraded to dapper and it`s just smooth!!

Jørgen Norway
interesting... try running command
dpkg-divert --list
and see if anything about firefox comes up.
(post output here)

joergenlie
June 1st, 2006, 04:08 PM
here it is :
joergenlie@ubuntu:~$ dpkg-divert --list
diversion of /sbin/depmod to /sbin/depmod.modutils by module-init-tools
diversion of /usr/share/man/man8/depmod.8.gz to /usr/share/man/man8/depmod.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/depmod.8.gz to /usr/share/man/fr/man8/depmod.modutils.8.gz by module-init-tools
diversion of /sbin/insmod to /sbin/insmod.modutils by module-init-tools
diversion of /usr/share/man/man8/insmod.8.gz to /usr/share/man/man8/insmod.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/insmod.8.gz to /usr/share/man/fr/man8/insmod.modutils.8.gz by module-init-tools
diversion of /sbin/update-modules to /sbin/update-modules.modutils by module-init-tools
diversion of /usr/share/man/man8/update-modules.8.gz to /usr/share/man/man8/update-modules.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/update-modules.8.gz to /usr/share/man/fr/man8/update-modules.modutils.8.gz by module-init-tools
diversion of /sbin/modinfo to /sbin/modinfo.modutils by module-init-tools
diversion of /usr/share/man/man8/modinfo.8.gz to /usr/share/man/man8/modinfo.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/modinfo.8.gz to /usr/share/man/fr/man8/modinfo.modutils.8.gz by module-init-tools
diversion of /sbin/kallsyms to /sbin/kallsyms.modutils by module-init-tools
diversion of /sbin/ksyms to /sbin/ksyms.modutils by module-init-tools
diversion of /sbin/lsmod to /sbin/lsmod.Lmodutils by module-init-tools
diversion of /usr/share/man/man8/lsmod.8.gz to /usr/share/man/man8/lsmod.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/lsmod.8.gz to /usr/share/man/fr/man8/lsmod.modutils.8.gz by module-init-tools
diversion of /sbin/modprobe to /sbin/modprobe.Lmodutils by module-init-tools
diversion of /usr/share/man/man8/modprobe.8.gz to /usr/share/man/man8/modprobe.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/modprobe.8.gz to /usr/share/man/fr/man8/modprobe.modutils.8.gz by module-init-tools
diversion of /sbin/rmmod to /sbin/rmmod.Lmodutils by module-init-tools
diversion of /usr/share/man/man8/rmmod.8.gz to /usr/share/man/man8/rmmod.modutils.8.gz by module-init-tools
diversion of /usr/share/man/fr/man8/rmmod.8.gz to /usr/share/man/fr/man8/rmmod.modutils.8.gz by module-init-tools
diversion of /usr/share/man/man5/modules.5.gz to /usr/share/man/man5/modules.modutils.5.gz by module-init-tools
diversion of /usr/share/man/fr/man5/modules.5.gz to /usr/share/man/fr/man5/modules.modutils.5.gz by module-init-tools
diversion of /usr/bin/ed2k to /usr/bin/ed2k.xmule by amule
diversion of /usr/share/man/man1/ed2k.1.gz to /usr/share/man/man1/ed2k.xmule.1.gz by amule
diversion of /usr/bin/locate to /usr/bin/locate.notslocate by slocate
diversion of /usr/bin/updatedb to /usr/bin/updatedb.notslocate by slocate
diversion of /usr/share/man/man1/locate.1.gz to /usr/share/man/man1/locate.notslocate.1.gz by slocate
diversion of /usr/share/man/man1/updatedb.1.gz to /usr/share/man/man1/updatedb.notslocate.1.gz by slocate
diversion of /etc/cron.daily/find to /etc/cron.daily/find.notslocate by slocate
diversion of /usr/lib/gimp/2.0/plug-ins/print to /usr/lib/gimp/2.0/print.orig by gimp-print
joergenlie@ubuntu:~$

I don't understand this, but it seems it doesn't say much about firefox

It seems like the .ubuntu.mozilla(or something) folder is gone too?

Jørgen

nanotube
June 1st, 2006, 05:39 PM
yes, that doesn't say anything about firefox, no active diversions for it.
hmm... ok, post output of
ls -al /usr/bin/fire* /usr/bin/mozilla*
let's see what you have in there.
also, let's see output
sudo dpkg -L firefox |grep "/usr/bin"
(that will show all files that are installed by the firefox package in /usr/bin)
you said you tried reinstalling with apt-get, and it says it is installed? just in case, also post output of
sudo apt-get install firefox

joergenlie
June 2nd, 2006, 02:46 AM
joergenlie@ubuntu:~$ ls -al /usr/bin/fire* /usr/bin/mozilla*
ls: /usr/bin/fire*: Ingen slik fil eller filkatalog
lrwxrwxrwx 1 root root 25 2006-02-17 15:34 /usr/bin/mozilla -> /etc/alternatives/mozilla
-rwxr-xr-x 1 root root 5193 2006-05-22 03:13 /usr/bin/mozilla-thunderbird
joergenlie@ubuntu:~$

This says no such file or directory


joergenlie@ubuntu:~$ sudo dpkg -L firefox |grep "/usr/bin"
Password:
/usr/bin
/usr/bin/firefox
/usr/bin/mozilla-firefox
joergenlie@ubuntu:~$

sudo apt-get firefox: already newest version.


Strange problem. I do appreciate your help, though:p

Thank you!

Jørgen

joergenlie
June 2nd, 2006, 05:47 PM
Solved!

I managed to get dapper firefox to work after i removed it thru apt and reinstalled it thru aptitude:p

Jørgen

nanotube
June 3rd, 2006, 11:51 PM
Solved!

I managed to get dapper firefox to work after i removed it thru apt and reinstalled it thru aptitude:p

Jørgen
ah cool. aptitude saves the day yet again. :)

FastZ
June 4th, 2006, 03:34 PM
Hey guys, first of all, thanks for making that script to automate the install of the newest version of Firefox. That's a Godsend.

Secondly, I ran into a few problems, some I've managed to fix on my own, some I've not been able to figure out. This is from a clean install of Ubuntu Breezy which has Firefox v1.0.8 (at the moment) that I would like to upgrade to v1.5.0.4. Now, after downloading and CHMODing the script and running the ./installnewfirefox.sh command, it downloads the newest version, looks like it's installing it (going too fast for me to read), and then stops and errors out with the following error:

Removing the unzipped .tar.gz


Linking plugins


Linking launcher to new Firefox

dpkg-divert: Cannot divert directories

You need --help.
Previous command did not complete successfully. Exiting.


Now, I dont know what I need to do to fix that. The problem I had right before this one was the libtotem plugins needed to be removed. I did that and carried on and wound up here with this error. Any and all help would be greatly appreciated. I'm sort of a newb but I know enough to get by with the simple stuff so you may need to dumb it down a bit when trying to explain things to me. :cool:

nanotube
June 5th, 2006, 12:07 AM
Hey guys, first of all, thanks for making that script to automate the install of the newest version of Firefox. That's a Godsend.

Secondly, I ran into a few problems, some I've managed to fix on my own, some I've not been able to figure out. This is from a clean install of Ubuntu Breezy which has Firefox v1.0.8 (at the moment) that I would like to upgrade to v1.5.0.4. Now, after downloading and CHMODing the script and running the ./installnewfirefox.sh command, it downloads the newest version, looks like it's installing it (going too fast for me to read), and then stops and errors out with the following error:

Removing the unzipped .tar.gz


Linking plugins


Linking launcher to new Firefox

dpkg-divert: Cannot divert directories

You need --help.
Previous command did not complete successfully. Exiting.


Now, I dont know what I need to do to fix that. The problem I had right before this one was the libtotem plugins needed to be removed. I did that and carried on and wound up here with this error. Any and all help would be greatly appreciated. I'm sort of a newb but I know enough to get by with the simple stuff so you may need to dumb it down a bit when trying to explain things to me. :cool:
that's strange... but at any rate,t he divert stuff comes at the end of installation, when everything is just about done. so we can fix it up.

can you post the output of command
dpkg-divert --list

also post output of command
ls -al /usr/bin/*fire*

FastZ
June 5th, 2006, 09:15 AM
I wish I had checked back here sooner. I upgraded to Ubuntu 6.0.6 last night before bed. I might go back to Breezy this evening after work just so I can get you those outputs. I'll let you know. Haven't used your script to update Firefox 1.5.0.3 in Dapper yet. Will try that before going back to Breezy just to see if it works. Like I said, I'll let you know what the output of those commands are later this evening.

nanotube
June 5th, 2006, 11:15 AM
I wish I had checked back here sooner. I upgraded to Ubuntu 6.0.6 last night before bed. I might go back to Breezy this evening after work just so I can get you those outputs. I'll let you know. Haven't used your script to update Firefox 1.5.0.3 in Dapper yet. Will try that before going back to Breezy just to see if it works. Like I said, I'll let you know what the output of those commands are later this evening.
ok, i'll be around. ;)

aysiu
November 5th, 2006, 01:36 AM
In case anyone's interested, nanotube's added some additions to the script:

It now works in Breezy, Dapper, and Edgy.

If you're having trouble with key verifications for the download, the script now allows you to continue without the verification, should you wish to do so.

It also symlinks the entire Firefox plugins directory to /opt/firefox/plugins instead of symlinking the individual plugins themselves. This way, if you add more plugins through aptitude or Synaptic or Adept, the plugins will be available with your newly installed Mozilla build Firefox.

nanotube
November 5th, 2006, 11:29 AM
Thanks for updating this thread, aysiu. :)

to give credit where it's due, I will also note that aysiu made a number of very useful suggestions and comments (he was basically the driver for all the new additions to this iteration of the script - i was just the implementor), and also did all the testing to make sure it works.

the script lives on both my site (http://pykeylogger.sourceforge.net/wiki/index.php/Ubuntu:Chronicles) as well as aysiu's site (http://www.psychocats.net/ubuntu/firefox)

I will also add a strong encouragement for everyone who uses this script and runs into problems to let me know. Any feature suggestions or possible improvements are also very welcome.

jis
November 7th, 2006, 06:41 PM
The script install Firefox 2.0 to the /opt directory and symlinks it so that the command firefox launches Firefox 2.0 (Mozilla build) and the command firefox.ubuntu launches Firefox 1.5 (Ubuntu build).


Thanks.

I have some remarks about the installnewfirefox.sh vs. install-swiftfox.sh:

installnewfirefox.sh

has a localization chooser that gives some extra invalid options that could be removed with help of the Mozilla Foundation. (The script makes some assumptions of Mozilla's site.)
downloads the binaries from mozilla.org, the well known Mozilla's site.
gives option to assure the integrity of the download, although I think it does not protect against man-in-the-middle attack and does not reveal if Mozilla's download site has been compromized.


whereas
install-swiftfox.sh

downloads the binaries from getswiftfox.com, which claims to serve optimized binaries and to be Jason Halme's site, but who knows him?

aysiu
November 7th, 2006, 07:03 PM
This is something nanotube and I differ on actually.

I'm not sure of how well the key verification guards you against a Mozilla server compromise, but I suppose it's better than nothing, and it can be avoided if you want to avoid it.

I don't know about the Swiftfox builds or who created them.

Maybe nanotube can it explain it a little better.

jis
November 7th, 2006, 08:04 PM
If the file is signed by some private key, and if you have the respective public key, it is very hard to fool you (i.e. downloader). It would be easier, if there was only some (hash) checksum that depends only on the file. But how do you get the public key?

nanotube
November 8th, 2006, 01:17 AM
If the file is signed by some private key, and if you have the respective public key, it is very hard to fool you (i.e. downloader). It would be easier, if there was only some (hash) checksum that depends only on the file. But how do you get the public key?

the public key is on file with a lot of keyservers. the install script picks up the mozilla key off one of them (subkeys.pgp.net). So, even if the mozilla ftp site was compromised and a trojaned tar.gz was uploaded, they would not be able to fake the pgp signature, which requires the use of the mozilla private key (presumably a very well-protected piece of info).

so, this would generally be good protection also against MITM attacks, since not only would our MITM have to be between you and mozilla.org, but also between you and subkeys.pgp.net, to be able to send you both a compromised binary, as well as a fake key. so, it would have to be a very sophisticated attack, targeting you specifically, and having the foreknowledge that you are "about to" install the official mozilla build of firefox, and to verify the gpg key, using that particular pgp server. not something i'd be losing sleep over, honestly. :)

as to swiftfox - it's just a guy who makes optimized builds of the firefox code. certainly his "trustworthiness" is less than that of the mozilla organization, since he's just "a dude". But he's been at it for a while, and his work can be easily confirmed for the absence of any code modifications by making a build of the firefox code with the exact same compiler flags that he uses (he publishes those with every optimized build). If there are no illicit code mods, your binary build should be byte-for-byte the same as his binary build. So... presumably if he were making some code mods and not telling anyone, "someone" would have noticed by now. at least that's the usual opensource logic. :)

and by the way, jis, feel free to take the discussions we have about the script over email onto this thread. this will allow other interested parties to comment.

jis
November 8th, 2006, 03:02 PM
Could the Firefox users that installed via the script subscribe to notifications that would tell when there are updates available? Maybe ubuntuforums.org could be used? Who would maintain the thread?

jis
November 8th, 2006, 03:15 PM
Could you add remarks to your instructions for the script that it can use a copy of preloaded tarball in user's home directory, but deletes the copy after it has been extracted?

aysiu
November 8th, 2006, 04:33 PM
nanotube, in answer to your PM, I think jis's proposed phrasing would be great. I'm definitely in favor of calling it an "installation file" instead of a ".tar.gz."

fakie_flip
November 8th, 2006, 06:20 PM
Introduction
Starting with the second post in this thread, nanotube brought to life a sophisticated script translating the many copy-and-paste commands from the Ubuntu Wiki for getting the Mozilla (not Ubuntu) build of Firefox installed.
...

If I install FF2 by the script, how can I undo/uninstall everything that the script did? Is there another script? Some instructions on how to do it manually would be good. Thanks.

Second question:
Will this cause problems with the package manager sense no package manager will recognize the FF2 that is there from the script? Couldn't one of the package managers try to overwrite something from the script not seeing that it is there and/or cause other problems?

aysiu
November 8th, 2006, 06:32 PM
If I install FF2 by the script, how can I undo/uninstall everything that the script did? Is there another script? Some instructions on how to do it manually would be good. Thanks. As a matter of fact, I created an uninstall script, available on this page: http://www.psychocats.net/ubuntu/firefox

There are also manual instructions available here, too:
http://help.ubuntu.com/community/FirefoxNewVersion

Second question:
Will this cause problems with the package manager sense no package manager will recognize the FF2 that is there from the script? Couldn't one of the package managers try to overwrite something from the script not seeing that it is there and/or cause other problems? No, no problems. It's completely separate. The package manager never touches the /opt directory.

fakie_flip
November 8th, 2006, 07:32 PM
f

fakie_flip
November 8th, 2006, 07:48 PM
I saw from some instructions that showed the script being run not as root, and then I looked at the script and saw a bunch of sudos. I'd like to have it keep going while I am asleep because the computer I will be using it on has dial up and the downloading is quite large for dial up, but I don't know if the script is going to stop while I am asleep waiting for some user input. Besides asking me for those user inputs, the script could keep asking me for the sudo password waiting for that before going on to the next. Is it a problem to just run the script like this instead?

sudo ./installnewfirefox.sh

I was asking if the script would conflict with the package manager because I didn't know what would happen when the package manager tried to upgrade the ubuntu's installed version of firefox and what it would think of the firefox.ubuntu link instead and if that install had been moved around or if it would confuse the new firefox with the old one for being in the same place or following one of the symbolic links.

fakie_flip
November 9th, 2006, 12:48 AM
I am waiting for Swiftfox2 deb to download on this slow dial up internet.

nanotube
November 9th, 2006, 10:03 AM
Could the Firefox users that installed via the script subscribe to notifications that would tell when there are updates available? Maybe ubuntuforums.org could be used? Who would maintain the thread?

well, i guess the simplest thing if one wan