-
Notifications
You must be signed in to change notification settings - Fork 0
/
mygnuglobal.sh
executable file
·49 lines (47 loc) · 1.41 KB
/
mygnuglobal.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
DIRS=$1
TAGS=gtags.files
echo "$DIRS/${TAGS} will be created!"
pushd $1
#should be asked whether TAGS is to be deleted or not
if [ -f ${TAGS} ]; then rm -f ${TAGS##*/}.*; fi
#base dir
#exclude dir list
#include file extension
time find ${DIRS} \
-path "$DIRS/kernel_goldfish" -prune -o\
-path "$DIRS/kernel_galaxynexus" -prune -o\
-path "$DIRS/out" -prune -o\
-path "$DIRS/external" -prune -o\
-path "$DIRS/external/apache-harmony" -prune -o\
-path "$DIRS/external/tagsoup" -prune -o\
-path "$DIRS/development/apps" -prune -o\
-path "$DIRS/packages" -prune -o\
-path "$DIRS/libnativehelper" -prune -o\
-path "$DIRS/prebuilt" -prune -o\
-path "$DIRS/prebuilts" -prune -o\
-path "$DIRS/sdk" -prune -o\
-path "$DIRS/ndk" -prune -o\
-path "$DIRS/gdk" -prune -o\
-path "$DIRS/pdk" -prune -o\
-path "$DIRS/cts" -prune -o\
-path "$DIRS/docs" -prune -o\
-path "$DIRS/.repo" -prune -o\
\(\
-name "*.[cChHxsS]" -o\
-name "*.cpp" -o\
-name "*.java" -o\
-name "*.xml" -o\
-name "*.rc" -o\
-name "*.map" -o\
-name "*.bat" -o\
-name "*.cmm" -o\
-name "*.sh" -o\
-name "*.py" -o\
-name "makefile" -o\
-name "Makefile" -o\
-name "*.mak" -o\
-name "*.mk" \) \
-print > $TAGS
# -b : not using cscope ui, -q : inverted index,
gtags -f $TAGS