Re: patch: UNIX shell script portability


Subject: Re: patch: UNIX shell script portability
From: Sam TH (sam@uchicago.edu)
Date: Thu Mar 01 2001 - 20:45:05 CST


On Thu, Mar 01, 2001 at 06:35:45PM -0800, Kevin Vajk wrote:
>
> On Thu, 1 Mar 2001, Sam TH wrote:
>
> > Is this a bashism, or a POSIX spec that isn't being followed?
>
> I don't know; I just wanted this patched because without the quotes it
> generates a warning on HP-UX, and bash is happy in either case. The
> HP-UX shell is POSIX-compliant, but then "bash --posix" probably is,
> too. So, I'm guessing POSIX doesn't specify anything here.

Strange. Well, this actually fixes a bug in bugzilla, too, about Sun
csh. Could you close that?

>
> > Also, do we need to be even more portable? I.e., do we need to do
> > this autoconf style with
> >
> > test "x$foo" != "$foo"
>
> You mean test "x$foo" != "x" right?
>

Doh. yep.

> > or can we just not support those platforms? This question is really -
> > Do any of those platforms support *any* interesting software, or can
> > we just forget about them?
>
> I think the way it is now is portable enough. If I'm wrong, it'll
> be easy and obvious to change the script if and when anybody ever ports
> it to a system which doesn't like the the current form. Realistically,
> I don't think that's likely to happen.
>
That's sort of what I figured too. I don't think people running
SunOS/m68k are likely to want to use AbiWord. :-)
           
        sam th
        sam@uchicago.edu
        http://www.abisource.com/~sam/
        GnuPG Key:
        http://www.abisource.com/~sam/key




This archive was generated by hypermail 2b25 : Thu Mar 01 2001 - 20:40:43 CST