Created
August 15, 2019 20:04
-
-
Save yunusemreayhan/40bbedd8dd7243eb18db3a0cb73ac09a to your computer and use it in GitHub Desktop.
builds cscope database into project folder, this one is only for kernel
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 | |
cur_dir=`pwd` | |
project_dir=$1 | |
cscope_dir=${project_dir}/cscope | |
rm -rf ${cscope_dir} | |
mkdir -p ${cscope_dir} | |
find ${project_dir}/ -type f \( \ | |
-name *.c \ | |
-o -name *.h \ | |
-o -name *.hh \ | |
-o -name *.cc \ | |
-o -name *.cpp \ | |
-o -name *.cxx \ | |
-o -name *.hxx \ | |
-o -name *.hpp \ | |
\) > ${cscope_dir}/cscope.files | |
cd ${cscope_dir} | |
cscope -b -q -k -i ${cscope_dir}/cscope.files # at the directory with 'cscope.files' | |
cd ${cur_dir} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment