[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: define _prefix in *.spec



On Thu, Jan 17, 2002 at 07:22:55PM -0500, Jim Knoble wrote:
> Circa 2002-Jan-17 13:27:59 +0200 dixit Harri Haataja:
> : On Thu, Jan 17, 2002 at 11:19:31AM +0100, Matthias Saou wrote:
> : > Once upon a time, Chris wrote :
> : > 
> : > Assuming too much again :-) Well, I guess that /bin/sh being a link to
> : > /bin/bash on Red Hat Linux is the reason of that assumption ;-) I suppose
> : > it should be considered a bug if your /bin/sh is a POSIX shell but that the
> : > scripts still don't work.
> : 
> : Bash is supposed to be operating in "compatibility mode"! if invoked as
> : sh, is it not?
> 
> Yes, but "compatibility mode" means that there's still a bunch of
> bash-specific crap that bash-masquerading-as-/bin/sh will still accept.
> The only real things that bash does but bash-masquerading-as-/bin/sh doesn't
> do are:
> 
>   - Read ~/.bashrc
>   - Read the startup file specified in BASH_ENV (does use ENV, though)
> 
> Bash-masquerading-as-/bin/sh still does do stuff like:
> 
>   - Perform curly-brace expansion (e.g., /bin/{ls,cp,mv,rm}), unless
>     it's turned off with a bash-specific shell option.
>   - Interpret character-class specifications when globbing patterns
>     containing square brackets (e.g., '${HOME}/[[:alpha:]]*' rather than
>     '${HOME}/[A-Za-z]*').
>   - Perform job control.

None of that sounds like a flaw in thhe emulation (does NOT do what real
sh does) but a useless feature. Ofcourse that is wrong, too, but the
problem would then lie in someone using those particular features and
calling it /bin/sh which it is then not.

> At the risk of repeating myself, the whole shell thing is a total mess.
> Everyone should use rc <http://freshmeat.net/projects/rc/> for
> scripting instead.  It's BSD-licensed, and the quoting rules are far
> easier to understand....

That looks like a solution, yes.

I wouldn't rely on all sh's being created equal, given what many of the
UNIX vendors seem to have managed to pull off in their
porting/specializing binges.
You could just as well standardize on bash and not have to install an
extra piece of software in many environments but haveing a small
script-interpreter would probably be a more elegant solution.
(I'm not quite certain if all bashes are alike either...)

-- 
False is just one of Wouter van Oortmerssen's many languages,
and is named after his favourite Boolean value.
	-- http://www.catseye.mb.ca/esoteric/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []