From 87b8ddc8e3dca8c389d5e1796bad417b45934063 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 18 May 2019 15:46:46 +0000 Subject: [PATCH] Upload attachment cscope_createindex.sh --- .../cscope_createindex.sh | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 uploads/451835f6b1894145af06050915256048/cscope_createindex.sh diff --git a/uploads/451835f6b1894145af06050915256048/cscope_createindex.sh b/uploads/451835f6b1894145af06050915256048/cscope_createindex.sh new file mode 100644 index 0000000..5de1b11 --- /dev/null +++ b/uploads/451835f6b1894145af06050915256048/cscope_createindex.sh @@ -0,0 +1,63 @@ +#!/usr/bin bash + +########################################## +### user setting, change if needed ### + +compress=false + +########################################## + + + +# NOTE: This script must reside in the main xonotic repo directory + +prev_dir="$PWD" + +cd $(dirname "$0") + + +cscope_args=" -b" + +# don't compress +if ! $compress; then + cscope_args="$cscope_args"" -c" +fi + +cscope_cmd="cscope" + +# 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 " + cscope_args="$cscope_args"" -X" +fi + + +echo +echo Updating qcsrc index... + +cd data/xonotic-data.pk3dir/qcsrc +find -name '*.inc' -or -name '*.q[ch]' > cscope.files +$cscope_cmd$cscope_args +if $compress; then + $cscope_cmd -L +fi +cd ../../.. +echo " Done!" + + +echo +echo Updating DP index... +cd darkplaces +$cscope_cmd$cscope_args +if $compress; then + $cscope_cmd -L +fi +cd .. +echo " Done!" + + +cd $prev_dir + +echo +read -n1 -r -p 'Press any key to exit.' key -- 2.39.2