~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/tools/make_ctags

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# src/tools/make_ctags
 
4
 
 
5
trap "rm -f /tmp/$$" 0 1 2 3 15
 
6
rm -f ./tags
 
7
 
 
8
cv=`ctags --version 2>&1 | grep Exuberant`
 
9
 
 
10
if [ -z "$cv" ]
 
11
then    FLAGS="-dt"
 
12
else    FLAGS="--c-types=+dfmstuv"
 
13
fi
 
14
 
 
15
find `pwd`/ \( -name _deadcode -prune \) -o \
 
16
                -type f -name '*.[chyl]' -print |
 
17
        xargs ctags "$FLAGS" -a -f tags
 
18
 
 
19
if [ -z "$cv" ]
 
20
then
 
21
        LC_ALL=C
 
22
        export LC_ALL
 
23
        sort tags >/tmp/$$ && mv /tmp/$$ tags
 
24
fi
 
25
 
 
26
find . \( -name 'CVS' -prune \) -o \( -name .git -prune \) -o -type d -print |
 
27
while read DIR
 
28
do      [ "$DIR" != "." ] && ln -f -s `echo "$DIR" | sed 's;/[^/]*;/..;g'`/tags "$DIR"/tags
 
29
done