- How to customize the Firefox Web Console output
- Web Console improvements, episode 30
- Three years with Mozilla, and counting
- The Browser Console is replacing the Error Console
- Web Console improvements and the new Browser Console
Article published on:6 October 2007, 17:01
Given the fact I'm constantly checking new Opera builds, I repeat lots of things. I decided to write my own BASH script which does the common work.
To better understand how the script works, and what it needs to do for me, here's an explanation of my usual testing setup.
First, I run Ubuntu Linux. I always keep and use the latest official stable release of Opera. I don't use the Debian package, because I want to upgrade more often than the repos. As such, I use the official tar.gz/tar.bz2 packages: I unpack them myself and I upgrade the files manually.
My stable Opera installation is self-contained within a single folder: ~/bin/opera. My profile is self-contained as well, within ~/bin/opera/usersettings (the default profile folder). I don't risk using ~/.opera. This way, I can make sure I always backup my entire Opera nicely - just the usersettings folder. That's where I keep all the Opera files, including plugins and emails.
I keep the weeklies in a completely separate folder: ~/opera-dev/linux. Here I manually unpack tar.gz/tar.bz2 archives. The nice thing about the Opera archives is you can immediately run them, since they create their own profile subfolders. This way I can have as many Opera "installations" running simultaneously without any problems.
By now, you can tell I have to manually move the archives I download to a predefined location where I store them. Also, if I want to test an experimental build with my stable profile, I generally don't have time to do it. That's because I would have to manually modify the INI files to point to the location of the experimental build, after I copy the entire stable profile folder. That's boring. :)
As such, here's how to use the Opera2 script:
This removes the profile of your latest Opera build. You can configure where experimental builds are located using the DIR_OP_DEV variable.
The same as above, but Opera will be started afterwards.
opera2 unpack opera-*.tar.bz2/gz
This unpacks the Opera build you want designated by the second argument. The build must be provided as a tar.gz or tar.bz2 file - as the official ones are. The package will moved to the configured DIR_OP_PACK, and the content of the archive will be extracted to your DIR_OP_DEV.
opera2 unpack-run opera-*.tar.bz2/gz
The same as above, but the script will also start Opera from the extracted folder.
opera2 upgrade opera-*
This will "upgrade" the Opera build you want designated by the second argument - a folder name starting with "opera-" followed by the major and minor version (this is the default naming of Opera builds). If the second argument is not specified, the current working directory will be used.
The script will copy files from your stable profile folder (defined by DIR_OP_STABLE) to the profile of the build you specified. The script will also make some changes to several copied files (will replace all paths pointing to the stable Opera installation folder to the new build).
Warning: Doing this will DELETE the profile of the target Opera build. The script does NOT try to detect if the destination folder is REALLY an experimental build. Do NOT run this on your Opera stable installation folder.
opera2 any thing else (or no arguments)
This will start the latest Opera build from the configured DIR_OP_DEV with the provided arguments. You can configure other applications to automatically open links with this script - the latest Opera build.
You should check the script source ... to be sure it will not break your stable installation. :) Always check the result of running this script before starting Opera.
As you can see, the script is tailored to my needs. Care should be taken when using the script. I am sure it does not work if your stable installation is configured with "exotic" file paths. The script was only tested with Opera 9.x builds, on Ubuntu 7.04.