[PATCH build 2/2] Clean up all conditional statements.
Trevor Woerner
twoerner at gmail.com
Wed Sep 15 05:09:24 PDT 2010
On Wed, Sep 15, 2010 at 7:56 AM, Mikhail Gusarov
<dottedmag at dottedmag.net> wrote:
>
> Twas brillig at 07:52:40 15.09.2010 UTC-04 when twoerner at gmail.com did gyre and gimble:
>
> TW> I have never questioned that one before. I've seen it done so often I
> TW> just assumed there was a good reason for it. But after doodling around
> TW> with a test script for a while I can't seem to see why the string
> TW> delimiters would be necessary. Does anyone know why "USE_XCB" = "NO"
> TW> wouldn't be good enough?
>
> $ echo $a
>
> $ [ zz = $a ]
> zsh: parse error: condition expected: a
> $ [ xzz = x$a ]
> $
Ah, I hadn't considered the case where the variable didn't exist :-)
Forcing the type to string using the 'x' works (which is what I assume
to be the purpose of this notation), but so does:
[ "zz" = "$a" ]
Which is what we have. Or is there still a case where the 'x' would be
necessary?
Best regards,
Trevor
More information about the xorg-devel
mailing list