]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh
Upload attachment spectating.png
[xonotic/xonotic.wiki.git] / uploads / 17c725e19be8f4935c30c2506e168405 / cscope_createindex.sh
1 #!/usr/bin bash
2
3 # NOTE: This script must reside in the main xonotic repo directory
4
5 prev_dir="$PWD"
6
7 cd $(dirname "$0")
8
9 cscope_cmd="cscope -bc"
10
11 # Windows: mingw version of cscope can't be used as it writes code path
12 # in Unix format to the index, making it broken for Windows apps that use it
13 if [ -e cscope.exe ] ; then
14         cscope_cmd="$PWD""/cscope.exe -bcX"
15 fi
16
17
18 echo 
19 echo Updating qcsrc index...
20
21 cd data/xonotic-data.pk3dir/qcsrc
22 find -name '*.inc' -or -name '*.q[ch]' > cscope.files
23 $cscope_cmd
24 cd ../../..
25 echo " Done!"
26
27
28 echo 
29 echo Updating DP index...
30 cd darkplaces
31 $cscope_cmd
32 cd ..
33 echo " Done!"
34
35
36 cd $prev_dir
37
38 echo 
39 read -n1 -r -p 'Press any key to exit.' key