搭建网页版源码阅读器
本文主要搭建网页版源码阅读器,阅读源码更方便。
以centos7 平台为例;
以centos7 平台为例;
安装gtags 和 htags
查看rpm包是否安装 rpm -qa | grep global 安装rpm包 yum install global
关键步骤
cd /root/ceph : 进入ceph源码目录 gtags -v : 生成tag文件 htags -sanohITvt ‘Welcome to ceph source tour!‘ :tag 文件生成后, 执行 htags 命令生成 HTML 文件 htags --suggest2 #htags-server >& log nohup htags-server -b 0.0.0.0 9091 &
实践脚本
执行脚本
cat gtags.sh #!/bin/bash #L 9092 #J 9093 DIR=$(dirname $(readlink -f "$0")) echo $DIR if [ $# -ne 2 ]; then echo "args num is 2" echo "arg1 is ceph dir" echo "arg2 is http port" echo "Example:http://192.168.0.103:9092/" exit 1 fi cd $DIR/$1 gtags -v htags -sanohITvt ‘Welcome to ceph source tour!‘ htags --suggest2 nohup htags-server -b 0.0.0.0 $2 & sleep 3 echo "===================" ps -ef | grep tags sleep 3 echo "===================" netstat -tunlp | grep $2
外部调用脚本
[ ~]# cat ceph_L.sh #!/bin/bash #http://192.168.0.110:9092/ #http://192.168.0.110:9093/ cd /root/mycode/community_code/ if [ ${1}x == "Lx" ];then sh gtags.sh ceph_luminous 9092 elif [ ${1}x == "Jx" ];then sh gtags.sh ceph_10.2.5 9093 else echo "Not support version! exit!" exit 1 fi
相关推荐
瓜牛呱呱 2020-11-12
柳木木的IT 2020-11-04
yifouhu 2020-11-02
lei0 2020-11-02
源码zanqunet 2020-10-28
源码zanqunet 2020-10-26
一叶梧桐 2020-10-14
码代码的陈同学 2020-10-14
lukezhong 2020-10-14
lzzyok 2020-10-10
anchongnanzi 2020-09-21
clh0 2020-09-18
changcongying 2020-09-17
星辰大海的路上 2020-09-13
abfdada 2020-08-26
mzy000 2020-08-24
shenlanse 2020-08-18
zhujiangtaotaise 2020-08-18
xiemanR 2020-08-17