[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell portability: don't use `set --'
From: |
Gary V. Vaughan |
Subject: |
Re: shell portability: don't use `set --' |
Date: |
Wed, 29 Dec 2004 00:52:49 +0000 |
User-agent: |
Mozilla Thunderbird 1.0 (Macintosh/20041206) |
Hallo Ralf!
Ralf Wildenhues wrote:
> * Gary V. Vaughan wrote on Fri, Dec 24, 2004 at 03:28:34PM CET:
>
>>Ralf Wildenhues wrote:
>>
>>>If so, OK to apply to HEAD and branch-2-0?
>>>
>>> * Makefile.am, bootstrap, clcommit.m4sh, libtoolize.m4sh,
>>> config/ltmain.m4sh: Replace `set --' with `set x [...]; shift'
>>> for portability.
>>
>>Actually, it is probably my fault for having let the -- idiom creep into
>>libtool. Up until 1.5 `set dummy ...' was used consistently throughout.
>>
>>I think we should continue in the same vein. So, yes, but using dummy
>>instead of x. While we're at it, adding something akin to the following
>>to sh.test should stop us (me!) accidentally doing it again:
>
>
> Thanks. I applied the following, slightly simpler patch (including your
> test) to HEAD and branch-2-0.
Hey, good call: Using shift is much cleaner.
That makes me think we should tighten the test to also error out if the
shift is missing. That would mean always having `; shift' on the same
line as the `set dummy ...', but might save us a slip up later.
If nobody beats me to it, I'll submit a patch when I get back from my
folks in Devon later this week.
Cheers,
Gary.
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook
signature.asc
Description: OpenPGP digital signature