Andrew Lentvorski wrote:
> 
> At one company, we had *hordes* of scripts that did what you said and 
> hard encoded the paths.  We had entire directories which had been around 
> for 5 years simply to support the links to enable those scripts. 
> Eventually, I got fed up with debugging this network of links on a 
> semi-weekly basis for my engineering team.

That is a development and maitenance fault more than a hardcoded path
fault.

I agree with Carl that the #! line should be hardcoded. I also believe
that setting the $PATH early on (even if it is to put things line /bin,
/usr/bin, /usr/local/bin at the beginning) is a good idea. This way
strange dependencies are seen at the top (why is
/users/jdoe/foo-1.62/bin in the $PATH?) instead of hidden deeply in the
script.

If your site model includes putting things in
/usr/local/package-version/ and then the $PATH gets foreach package1-ver
package2-ver package3-ver; PATH=$PATH:/usr/local/$_/bin; done  then you
are really asking for it. (I know of sites that do similar things. I
cringe).

I do understand about having to support older version of interpreters
(perl, specifically) and can commiserate with that. This is why I am a
big fan of things like stow. Yes, it is a maze of twisty symlinks, but
they are managed symlinks.

-john

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to