Improve pginclude tests.
This commit is contained in:
parent
4084681546
commit
1be8f80288
@ -1,7 +1,7 @@
|
|||||||
:
|
:
|
||||||
# remove extra #include's
|
# remove extra #include's
|
||||||
|
|
||||||
# $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.11 2006/07/11 20:12:29 momjian Exp $
|
# $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.12 2006/07/11 20:51:25 momjian Exp $
|
||||||
|
|
||||||
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
|
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
|
||||||
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
|
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
|
||||||
@ -61,12 +61,16 @@ do
|
|||||||
-o /tmp/$$.o >/tmp/$$ 2>&1
|
-o /tmp/$$.o >/tmp/$$ 2>&1
|
||||||
if [ "$?" -eq 0 ]
|
if [ "$?" -eq 0 ]
|
||||||
then echo "$FILE $INCLUDE"
|
then echo "$FILE $INCLUDE"
|
||||||
|
if [ "$1" = "-v" ]
|
||||||
|
then cat /tmp/$$
|
||||||
|
cat /tmp/$$b
|
||||||
|
cat /tmp/$$.c
|
||||||
|
fi
|
||||||
grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" >/tmp/$$b
|
grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" >/tmp/$$b
|
||||||
mv /tmp/$$b "$FILE"
|
mv /tmp/$$b "$FILE"
|
||||||
|
elif [ "$1" = "-v" ]
|
||||||
|
then echo "$FILE"
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "-v" ]
|
|
||||||
then cat /tmp/$$
|
|
||||||
cat /tmp/$$.c
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user