From 3bf064908554e400eb084d708480eb07a1f9c2aa Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 11 May 2019 14:47:57 +0000 Subject: [PATCH] Upload attachment cscope_createindex.sh --- .../cscope_createindex.sh | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh diff --git a/uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh b/uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh new file mode 100644 index 0000000..27a96f8 --- /dev/null +++ b/uploads/17c725e19be8f4935c30c2506e168405/cscope_createindex.sh @@ -0,0 +1,39 @@ +#!/usr/bin bash + +# NOTE: This script must reside in the main xonotic repo directory + +prev_dir="$PWD" + +cd $(dirname "$0") + +cscope_cmd="cscope -bc" + +# Windows: mingw version of cscope can't be used as it writes code path +# in Unix format to the index, making it broken for Windows apps that use it +if [ -e cscope.exe ] ; then + cscope_cmd="$PWD""/cscope.exe -bcX" +fi + + +echo +echo Updating qcsrc index... + +cd data/xonotic-data.pk3dir/qcsrc +find -name '*.inc' -or -name '*.q[ch]' > cscope.files +$cscope_cmd +cd ../../.. +echo " Done!" + + +echo +echo Updating DP index... +cd darkplaces +$cscope_cmd +cd .. +echo " Done!" + + +cd $prev_dir + +echo +read -n1 -r -p 'Press any key to exit.' key -- 2.39.2