-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparse.sh
executable file
·42 lines (35 loc) · 1.06 KB
/
parse.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
#!/bin/bash
list_sources() {
echo "---> Listing sources..."
find . \
-path "./arch*" -prune -o \
-path "./tmp*" -prune -o \
-path "./Documentation*" -prune -o \
-path "./scripts*" -prune -o \
-type f -name "*.[chsS]" -print >cscope.files
find arch/arm/include/ \
arch/arm/kernel/ \
arch/arm/common/ \
arch/arm/boot/ \
arch/arm/lib/ \
arch/arm/mm/ \
arch/arm/mach-omap2/ \
arch/arm/plat-omap/ \
-type f -name "*.[chsS]" -print >>cscope.files
}
create_cscope_db() {
echo "---> Creating cscope DB..."
cscope -k -b -q
}
create_ctags_db() {
echo "---> Creating CTags DB..."
ctags -L cscope.files
}
cleanup() {
echo "---> Removing garbage..."
rm -f cscope.files
}
list_sources
create_cscope_db
create_ctags_db
cleanup