Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bbd41aa

Browse files
committed
Improve tool coding.
1 parent d4cef0a commit bbd41aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/pginclude/pgrminclude

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
:
22
# remove extra #include's
33

4-
# $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.4 2006/03/11 04:38:42 momjian Exp $
4+
# $PostgreSQL: pgsql/src/tools/pginclude/pgrminclude,v 1.5 2006/07/10 16:45:44 momjian Exp $
55

66
trap "rm -f /tmp/$$.c /tmp/$$.o /tmp/$$ /tmp/$$a /tmp/$$b" 0 1 2 3 15
7-
find . \( -name CVS -a -prune \) -o -type f -print |
7+
find . \( -name CVS -a -prune \) -o -type f -name '*.[ch]' -print |
88
grep -v '\./postgres.h' |
99
grep -v '\./pg_config.h' |
1010
grep -v '\./c.h' |
1111
while read FILE
1212
do
13-
if [ "`echo $FILE | sed -n 's/^.*\.\([^\.]*\)$/\1/p'`" = "h" ]
13+
if [ `expr $FILE : '.*\.h$'` -ne 0 ]
1414
then IS_INCLUDE="Y"
1515
else IS_INCLUDE="N"
1616
fi

0 commit comments

Comments
 (0)