cscope命令

#!/bin/bash
ROOTPATH=/home/yuyongjun/professor/navigation
list=cscope.files
SERCHPATH="./*" 


if [ -e $list ]; then
rm $list
fi


for p in $SERCHPATH
do
#echo $p 
WHOLEPATH=$ROOTPATH/$p
find $WHOLEPATH -name "*.c" >> $list
find $WHOLEPATH -name "*.h" >> $list
find $WHOLEPATH -name "*.S" >> $list
done




if [ -e $list ]; then
ctags -L $list --c++-kinds=+p --fields=+iaS --extra=+q
cscope -b -q -k
fi

posted @ 2012-09-17 22:43  冰呆瓜  阅读(279)  评论(0编辑  收藏  举报