代码拉取完成,页面将自动刷新
#!/bin/sh
# add arguments for extra include path.
kernel_mode=0 #kernel_mode doesn't serach system include path.
cscope_arg=-bqk
while test $# != 0
do
case $1 in
-n|--native)
kernel_mode=0
shift
;;
-k|--kernel-mode)
kernel_mode=1
shift
;;
-h|--help)
echo -n "make_cscope_db.sh [-n|k] [extra include paths]\n"
echo "\t-n: set to native project mode."
echo "\t-k: set to kernel mode (don't search system include path)."
echo "\t-h: show this help."
exit 0
;;
*) break
;;
esac
done
if [ $kernel_mode -eq 0 ];then
cscope_arg=${cscope_arg%k}
echo -n "native mode, "
else
echo -n "kernel mode, "
fi
echo cscope_arg=$cscope_arg
for i in $@
do
arg="-I"$i
args=$args" "$arg
done
find $PWD -path .git -prune \
-o -name "*.h" -print \
-o -name "*.hpp" -print \
-o -name "*.c" -print \
-o -name "*.cc" -print \
-o -name "*.cpp" -print \
> cscope.files
if [ -n "$args" ];then
echo "extra args:\n $args"
fi
cscope $cscope_arg -i cscope.files $args
# ctags --c++-kinds=+px --fields=+liaS --extra=+q -L cscope.files
#ctags -R --c++-kinds=+px --fields=+liaS --extra=+q $PWD $@
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。