Created
August 29, 2019 08:40
-
-
Save yunusemreayhan/9b868069d8fbe40a5e2f33f1adf7d5d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "processing file `pwd`/cscope_create_db.sh" | |
curdir=`pwd` | |
project_dir="asdasdasd" | |
cscope_dir="${project_dir}/cscope" | |
cscope_file="${cscope_dir}/cscope.files" | |
NEW_CSCOPE_DB="asdasdasdcscope/cscope.out" | |
OLD_CSCOPE_DB="asdasdasdold_cscope.out" | |
mv $NEW_CSCOPE_DB $OLD_CSCOPE_DB | |
export CSCOPE_DB=$OLD_CSCOPE_DB | |
rm -rf ${cscope_dir} | |
mkdir -p ${cscope_dir} | |
mv old | |
# create cscope file | |
cd ${project_dir} | |
find ${project_dir} -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" -o -name "*.tcc" > ${cscope_file} | |
# build db | |
cd ${cscope_dir} | |
cscope -q -R -b -i ${cscope_file} | |
#cscope -q -R -i ${cscope_file} | |
export CSCOPE_DB=$NEW_CSCOPE_DB | |
cd ${curdir} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment