Make 'find' syntax consistent; add .git exclusion to make_ctags.
authorBruce Momjian <bruce@momjian.us>
Wed, 14 Jan 2009 21:59:19 +0000 (21:59 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 14 Jan 2009 21:59:19 +0000 (21:59 +0000)
src/tools/make_ctags
src/tools/make_etags

index 40f59d48bcc8ce333fd467a7e194115b18935c73..62684066b8a0661d15f774531cd42965e893145b 100755 (executable)
@@ -12,8 +12,9 @@ then  FLAGS="-dt"
 else   FLAGS="--c-types=+dfmstuv"
 fi
 
-find `pwd`/ \( -name _deadcode -a -prune \) -o \
-       -type f -name '*.[chyl]' -print|xargs ctags "$FLAGS" -a -f tags
+find `pwd`/ \( -name _deadcode -prune \) -o \
+               -type f -name '*.[chyl]' -print |
+       xargs ctags "$FLAGS" -a -f tags
 
 if [ -z "$cv" ]
 then
@@ -22,7 +23,7 @@ then
        sort tags >/tmp/$$ && mv /tmp/$$ tags
 fi
 
-find . -name  'CVS' -prune -o -type d -print  |while read DIR
-do
-       [ "$DIR" != "." ] && ln -f -s `echo "$DIR" | sed 's;/[^/]*;/..;g'`/tags $DIR/tags
+find . \( -name 'CVS' -prune \) -o \( -name .git -prune \) -o -type d -print |
+while read DIR
+do     [ "$DIR" != "." ] && ln -f -s `echo "$DIR" | sed 's;/[^/]*;/..;g'`/tags "$DIR"/tags
 done
index 48a36cc330ccc4584d9d898297c1a4f8a3dc54d7..b9168f377c6f4125ea4cb3294e2b63391dc7ca77 100755 (executable)
@@ -3,10 +3,11 @@
 # $PostgreSQL$
 
 rm -f ./TAGS
-find `pwd`/ -type f -name '*.[chyl]' -print | \
-  xargs etags --append -o TAGS
 
-find . -type d \( -name CVS -o -name .git -prune -o -print \) | \
-while read DIR; do
-  [ "$DIR" != "." ] && ln -f -s `pwd`/TAGS $DIR
+find `pwd`/ -type f -name '*.[chyl]' -print |
+       xargs etags --append -o TAGS
+
+find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -type d -print |
+while read DIR
+do     [ "$DIR" != "." ] && ln -f -s `pwd`/TAGS "$DIR"
 done