[PATCH] xkb: Set sane build time XKB defaults

Dan Nicholson dbn.lists at gmail.com
Mon Jan 12 07:09:13 PST 2009


On Mon, Jan 12, 2009 at 6:57 AM, Julien Cristau <jcristau at debian.org> wrote:
> On Mon, Jan 12, 2009 at 06:49:42 -0800, Dan Nicholson wrote:
>
>> Looks good. Oh, it looks like the binary [[ ]] shell operators slipped
>> in there at some point. Those are bash only, I think, and should be
>> fixed. But that's not part of this patch.
>>
> It's the usual [ ], except this is m4 so there's an extra pair of [ ].

Looks like you're right. Still, it's forking to cut get the first
character, when the whole thing could be done in a simple case
statement.

-XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
-
-if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then
-   XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
-fi
+case "$XKBOUTPUT" in
+/*) ;;
+*)  XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" ;;
+esac

--
Dan



More information about the xorg mailing list