[PATCH] Use '[]' over 'test' throughout.

Alan Coopersmith alan.coopersmith at oracle.com
Tue Sep 14 07:53:59 PDT 2010


Julien Cristau wrote:
> On Tue, Sep 14, 2010 at 09:50:44 -0400, Gaetan Nadon wrote:
> 
>> On Tue, 2010-09-14 at 07:29 -0400, Trevor Woerner wrote:
>>
>>> Consistently use one conditional notation, ('[]') over
>>> the other ('test').
>>>
>> I am not an expert on shells, but I think the [] construct is less
>> portable that the "test" construct.
>> If you grep the "configure" scripts generated by Autoconf, it
>> exclusively uses "test". I have not read every line
>> carefully however. If you grep the configure.ac files, same story.
>>
> [] in configure is a PITA because [] are special in m4.  That doesn't
> apply to this script.

Right - I don't know of any OS we support with a shell that doesn't support
[] - even the ancient Solaris bourne shell can handle them, and it's usually
the cause of many shell workarounds.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list