1 Star 1 Fork 1

Bin / trantor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.sh 942 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
#building trantor
function build_trantor() {
#Saving current directory
current_dir="${PWD}"
#The folder we will build
build_dir='./build'
if [ -d $build_dir ]; then
echo "Deleted folder: ${build_dir}"
rm -rf $build_dir
fi
#Creating building folder
echo "Created building folder: ${build_dir}"
mkdir $build_dir
echo "Entering folder: ${build_dir}"
cd $build_dir
echo "Start building trantor ..."
if [ $1 -eq 1 ]; then
cmake .. -DBUILD_TESTING=on
else
cmake ..
fi
#If errors then exit
if [ "$?" != "0" ]; then
exit -1
fi
make
#If errors then exit
if [ "$?" != "0" ]; then
exit -1
fi
echo "Installing ..."
sudo make install
#Reback current directory
cd $current_dir
exit 0
#Ok!
}
if [ "$1" = "-t" ]; then
build_trantor 1
else
build_trantor 0
fi
1
https://gitee.com/huzbin/trantor.git
git@gitee.com:huzbin/trantor.git
huzbin
trantor
trantor
master

搜索帮助