]> granicus.if.org Git - postgresql/commitdiff
Fix to work better with Exuberant's version of ctags.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Jun 2004 22:00:40 +0000 (22:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Jun 2004 22:00:40 +0000 (22:00 +0000)
Gavin Sherry

src/tools/make_ctags

index da1ee8fcc989dbd300a13ab7fa6367b3b488914a..7f7c8f55eefbe12284e1684e84517972c89b9fed 100755 (executable)
@@ -2,17 +2,22 @@
 trap "rm -f /tmp/$$" 0 1 2 3 15
 rm -f ./tags
 
-if ctags --version 2>&1 | grep Exuberant >/dev/null
-then   FLAGS="--c-types=+dfmstuv"
-else   FLAGS="-dt"
+cv=`ctags --version 2>&1 | grep Exuberant`
+
+if [ -z "$cv" ]
+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
 
-LC_ALL=C
-export LC_ALL
-sort tags >/tmp/$$ && mv /tmp/$$ tags
+if [ -z "$cv" ]
+then
+       LC_ALL=C
+       export LC_ALL
+       sort tags >/tmp/$$ && mv /tmp/$$ tags
+fi
 
 find . -name  'CVS' -prune -o -type d -print  |while read DIR
 do