Subject: Re: test: ==: unexpected operator
To: None <tech-userlevel@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-userlevel
Date: 09/23/2006 07:35:16
Geert Hendrickx 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.
> 
> 
> Not that I disagree with this small extensions, but it's against the exact
> reason why we tell people to write #!/bin/sh scripts instead of #!/bin/bash
> scripts.  If we start the extend our sh(1) with bash "features", we are
> contributing to script-unportability.

I have always liked how simple it is to port NetBSD programs to other 
operating systems that lack important features.

If we start allowing the == operator, I'm sure some NetBSD developers 
will say "fine, it works" and code like that. In effect, porting these 
scripts to other systems would be made harder.

To solve the problems for pkgsrc, I have written a small check for 
configure scripts (since these cause the most problems), which I will 
discuss on tech-pkg.

Roland