1 Star 0 Fork 12

Ka-Russell/sylar

forked from sylar/sylar 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
generate.sh 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
sylar 提交于 2019-08-23 09:54 . 更新项目模板
#!/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"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/karussell/sylar.git
git@gitee.com:karussell/sylar.git
karussell
sylar
sylar
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385