Subject: Re: test: ==: unexpected operator
To: Quentin Garnier <cube@cubidou.net>
From: David Brownlee <abs@NetBSD.org>
List: tech-userlevel
Date: 09/22/2006 19:51:14
On Fri, 22 Sep 2006, Quentin Garnier wrote:

> On Fri, Sep 22, 2006 at 03:56:46PM +0100, David Brownlee wrote:
>> On Fri, 22 Sep 2006, Juan RP wrote:
>>
>>> On Fri, 22 Sep 2006 08:59:40 +0200
>>> Quentin Garnier <cube@cubidou.net> wrote:
>>>
>>>> On Fri, Sep 22, 2006 at 02:06:08AM +0200, Hubert Feyrer wrote:
>>>>>
>>>>> bash/Linux allows "==" as an alternative to "=" in their test(1)
>>>>> command. I wonder if we want to save some trouble and just make our
>>>>> test(1) silently accept that too, instead of fixing all the broken
>>>>> scripts out there.
>>>>>
>>>>> It'd be an extension to POSIX, so I don't see much of a problem.
>>>>>
>>>>> Any thoughts?
>>>>
>>>> I don't really see the point.  Scripts that do that in pkgsrc will
>>>> have to be fixed no matter what because there are platforms we cannot
>>>> bastardize the same way we can with NetBSD.  Changing this will just
>>>> make them harder to detect, because a lot of pkgsrc developers use
>>>> NetBSD to do pkgsrc work.
>>>
>>> I agree. The person should fix its stupid bash scripts.
>>
>> 	I like the 'accept it with a warning to stderr' idea, in
>> 	case anyone is counting...
>
> I like it too, but what would be awesome is an option to force it to

 	Hmm... 'set -o posix' anyone?
-- 
 		David/absolute       -- www.NetBSD.org: No hype required --