On Wed, Jul 25, 2012 at 11:39 PM, Andreas Metzler
<ametz...@downhill.at.eu.org> wrote:
> On 2012-07-26 Piotr Stanczyk <pstanc...@ilm.com> wrote:
>> From: openexr-devel-bounces+pstanczyk=ilm....@nongnu.org 
>> [openexr-devel-bounces+pstanczyk=ilm....@nongnu.org] on behalf of Andreas 
>> Metzler [ametz...@downhill.at.eu.org]
>>> Find attached a trivial patch against the four bootstrap scripts,
>>> fixing a unnecessary bashism.
>
>> Thanks for the patches. I had a quick look at them and noticed that
>> the '==' operator has been replaced by '=' one.  Could you provide a
>> little more information as to the rationale behind this.
>
>
> Good morning,
>
> No problem.
>
> [ or test are usually shell-builtins. Bash's builtin' version offers
> some enhancements, including the fact that it allows to use "=="
> instead of "=" for string comparison. However other POSIX compatible
> sh-shells (notably dash) do not. On Ubuntu and Debian /bin/sh is not
> Bash, and the command fails:

Well, that's not "exotic" at all ;-) dash is quite common.

Please feel free to replace the phrase "exotic shells" with "common
shells" in my previous email.


> ametzler@argenau:/tmp/ilmbase$ ./bootstrap
> ./bootstrap: 4: [: Linux: unexpected operator
>
> bash(1) says about this:
> CONDITIONAL EXPRESSIONS
> Conditional expressions are used by the [[ compound command and the
>        test and [ builtin commands to test file attributes and
>        perform string and arithmetic comparisons.
> [...]
>        string1 == string2
>        string1 = string2
>               True if the strings are equal.  = should be used with
>               the test command for POSIX conformance.
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

Thanks for digging up the docs,
-- 
David

_______________________________________________
Openexr-devel mailing list
Openexr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel

Reply via email to