Still languishing, this blog. Time to get on and finish it.
Let's look at the manual process I used to use to update Firefox and Thunderbird. It's a bit clunky, and doesn't do a lot of the tedious tidying up that needs to be done to stop old installations and install kits downloaded from Mozilla clogging up lots of disk space. It does allow you to leave the applications running during the process and switch to the new version on the next restart of the application, which is a good thing.
Here we go....
First (having downloaded the update from Mozilla [not a third party redistributor!]), create a directory to contain the new version
Note: by chance "Dow*" matches just one entry in my home directory, "Downloads", which means I can save typing 5 whole characters.
# cd /usr/local/lib
# ls -lrt ~steve/Dow* | tail -1
-rw-r--r-- 1 steve steve 41957229 Sep 21 08:54 firefox-32.0.2.tar.bz2
# mkdir firefox-32.0.2
Now move into the new directory and extract the file from the install kit.
Sorry about the "sync" commands - I'm old enough to remember when they were a good idea after doing anything disc-related that you didn't want to lose.
# cd firefox-32.0.2
# bunzip2 -c ~steve/Dow*/firefox-32.0.2.tar.bz2 | tar xpf -
# sync
The tar archive contains a single directory (firefox or thunderbird depending which you're installing) which contains all the files which comprise the application. I was brought up to avoid creating skinny dangling directory trees like this, so the next few commands shuffle everything round to get rid of it. GNU tar can also do this for you, as per the script I'll describe later.
The fiddly renames to "sja" prevent a collision during the execution of "mv" which would cause it to fail. [Mozilla have not yet seen any advantage in storing any of the application components in a file graced with my initials as it's name]
# mv * sja
# cd *
# mv * ..
# cd ..
# rmdir sja
Now change up a directory into /usr/local/lib and remake the symlink there which points to the main executable (firefox or thunderbird). The absolute path of the directory they were loaded from is one of the items passed to them in their environment at runtime, so they can find the rest of the installation components.
# cd ..
# ls -ld fire*
lrwxrwxrwx 1 root root 24 Sep 14 10:15 firefox -> ./firefox-32.0.1/firefox*
drwxr-xr-x 7 root root 4096 Sep 14 10:00 firefox-32.0.1/
drwxr-xr-x 7 root root 4096 Sep 21 08:59 firefox-32.0.2/
# rm firefox;ln -s ./firefox-32.0.2/firefox firefox;sync
All done, apart from tidying up, and the newly installed version will be used from the next restart of firefox of thunderbird.
[It isn't really. Haven't cleaned up at all, and this ought to be done. this needs a script, as there is quite a lot to do and I don't want to wear out my typing fingers.]
No comments:
Post a Comment