1 Star 0 Fork 2

double.li/cppframe

forked from NathanJoy/cppframe 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
generate.sh 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
NathanJoy 提交于 2021-02-01 13:41 . update
#!/bin/sh
command_error_exit() {
$*
if [ $? -ne 0 ]
then
exit 1
fi
}
if [ $# -lt 2 ]
then
echo "use [$0 project_name namespace]"
exit 0
fi
project_name=$1
namespace=$2
command_error_exit mkdir $project_name
command_error_exit cd $project_name
command_error_exit git clone https://github.com/sylar-yin/sylar.git
command_error_exit cp sylar/Makefile .
command_error_exit cp -rf sylar/template/* .
command_error_exit cp -rf sylar/template/* .
command_error_exit mv template ${namespace}
command_error_exit sed -i "s/project_name/${project_name}/g" CMakeLists.txt
command_error_exit sed -i "s/template/${namespace}/g" CMakeLists.txt
command_error_exit sed -i "s/project_name/${project_name}/g" move.sh
command_error_exit cd ${namespace}
command_error_exit sed -i "s/name_space/${namespace}/g" `ls .`
command_error_exit sed -i "s/project_name/${project_name}/g" `ls .`
command_error_exit cd ../bin/conf
command_error_exit sed -i "s/name_space/${namespace}/g" `ls .`
command_error_exit sed -i "s/project_name/${project_name}/g" `ls .`
echo "create module ${project_name} -- ${namespace} ok"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/li_dabo/cppframe.git
[email protected]:li_dabo/cppframe.git
li_dabo
cppframe
cppframe
master

搜索帮助