Saturday, 10. October 2009, 20:37:03
wget, cURL
In my
previous blog post I talked about using Wget or cURL to grab the latest Opera UNIX snapshot, which got me thinking about these two great tools and also encouraged me to run a few searches and read up on them again. I have been familiar with both for quite a while but it is nice to read up on tools again from time to time, to ensure I'm not missing out on some powerful new feature that has slipped into the latest release.
During my searches I seemed to stumble across quite a few sites that claimed that cURL is the replacement for, or 'successor' to Wget. As a user and fan of both I think this is a little unfair. Yes cURL supports a greater range of protocols and has a large number of powerful features not present in Wget but to this day it doesn't do everything that Wget does, nor do I believe that its author intends it to.
Read more...
Friday, 2. October 2009, 07:17:00
wget, install, auto-update, testing
...
From time to time users ask me about getting more Opera Linux repositories. Recently I was asked about this in relation to us providing .rpm based auto updates of snapshots on the desktopteam blog, and I answered as follows:
Originally posted by ruario:
The debian packages are by far our most popular Linux download so they got a repository first. Additionally there is more that one rpm update system (apt-rpm, Urpmi, Zypper, Smart Package Manager, etc.), and if you start considering non .rpm distros as well the multitude of update systems on Linux/UNIX gets ever larger (slackpkg, slapt-get, Swaret, pacman/Yaourt, Portage, etc.). As you can imagine the decision about what to support is therefore quite hard. Additionally, a number of distros (Gentoo, Arch, SUSE, Linux Mint, etc.) include us in their own official or community repositories anyway meaning that further repositories are often unnecessary. All that said, we are of course constantly reviewing this situation and we may add an rpm based repository in the future.
Also, it is worth mentioning that snapshots are not currently available on the debian repository anyway, so the users of debian based systems are also downloading these snapshots 'manually'. For more information on this read the "Why no snapshot auto-updates?" section of my recent blog post.
If you feel it is too 'manual', it would be fairly simple to knock up a shell script utilising wget (or curl) to auto grab your favoured package and install it (I'm not recommending you do so but it could be done), e.g. a script that does something like:
1. Pull the rss feed.
2. Extract the first blog post link and grab that page.
3. Extract the 'snapshot.opera.com/unix/....' link.
4. Parse the sub-directory and build number to work out the download link to your favoured package.
5. Grab the package and pass this to your package manager for install (or extract and install with the tar package).
This got me thinking about exactly how easy this would be to do and it occurred to me that I could probably do it with a one liner (albeit a fairly long and ugly one liner). Here is what I came up with after a just a couple of minutes thinking.
Read more...