Fix check on OS X sh
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 6 Aug 2011 00:09:25 +0000 (20:09 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 6 Aug 2011 00:09:25 +0000 (20:09 -0400)
src/check-header-guards.sh

index dc1893c..4dd2a0b 100755 (executable)
@@ -15,7 +15,7 @@ for x in $HBHEADERS $HBSOURCES; do
        echo "$x" | grep '[^h]$' -q && continue;
        xx=`echo "$x" | sed 's@.*/@@'`
        tag=`echo "$xx" | tr 'a-z.-' 'A-Z_'`
-       lines=`grep "\<$tag\>" "$x" | wc -l`
+       lines=`grep "\<$tag\>" "$x" | wc -l | sed 's/   //g'`
        if test "x$lines" != x3; then
                echo "Ouch, header file $x does not have correct preprocessor guards"
                stat=1