On Sun, 15 May 2011, Ethan Grammatikidis wrote:


On 13 May 2011, at 9:35 pm, Bjartur Thorlacius wrote:

On 5/12/11, Ethan Grammatikidis wrote:
A bit late but I thought it worth mentioning you don't even have to install Opera 11, just untar it and run in situ. I wrote a little script to cd to the highest-versioned dir matching ~/apps/opera-* and run the included script. I much prefer that to a package manager keeping track of where everything is.

I dislike package managers almost as much as everyone else on this list (while I believe them to be the best feature of mainstream Free distros (aside from hackability)), but seriously, wouldn't it suck less to use a single link and get rid of the script?

The included script relies on the basename of $0, so I'd have to rewrite it on every upgrade. This is what I have instead:

#!/bin/sh
cd ~/apps
dir=`ls -t opera* | sed 1q`
cd $dir
./opera

When installing a new version of Opera, just link the latest one to ~/apps/opera. Then you don't need the script, or it at least becomes really simple. I assume your basename of $0 comment means the script cares where it lives, so you can't just link it in ~/bin/ (ln -s ~/apps/opera/opera ~/bin/)?

#!/bin/sh
cd ~/apps/opera
./opera

--
Best,
Ben

Reply via email to