1 Star 0 Fork 96

西点钟灵毓秀/mult_timer

forked from 极简美/mult_timer 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
prepare.sh 1.90 KB
一键复制 编辑 原始数据 按行查看 历史
极简美 提交于 2023-08-28 07:13 . 导入最新cmake最新框架
#!/bin/bash
function helpMessage(){
echo "SYNOPSIS"
echo " ./prepare.sh -t <Debug | Release> -l <artifactory url>"
echo "OPTIONS"
echo " -h: show help for prepare.sh"
echo " -t: specified build type, alternative Debug and Release"
echo " -l: specified artifactory url, like Nexus or JFrog repo-url"
}
CURDIR=$(cd $(dirname $0); pwd)
while getopts "ht:l:" opt; do
case $opt in
t)
if [ "$OPTARG" != "Debug" ] && [ "$OPTARG" != "Release" ]; then
echo "build type only alternative debug and release"
exit 1
fi
BUILD_TYPE="$OPTARG"
;;
l)
ARTIFACTORY_URL="$OPTARG"
;;
h)
helpMessage
exit 0
;;
?)
echo " There is unrecognized parameter!"
helpMessage
exit 1
;;
esac
done
artifact_exist=`conan remote list | grep artifact | awk '{print $2}'`
if [ ! -n "$BUILD_TYPE" ]; then
BUILD_TYPE="Release"
fi
if [ ! -n "$ARTIFACTORY_URL" ] && [ "$artifact_exist" = "" ]; then
echo "please specify the artifact address!"
exit 1
elif [ "$artifact_exist" = "" ]; then
conan remote add artifact $ARTIFACTORY_URL
elif [ ! -n "$ARTIFACTORY_URL" ]; then
ARTIFACTORY_URL=$artifact_exist
elif [ "$ARTIFACTORY_URL" != "$artifact_exist" ]; then
conan remote remove artifact
conan remote add artifact $ARTIFACTORY_URL
fi
if [ ! -d output/build/conan ]; then
mkdir -p output/build/conan
fi
echo "##########################################################"
echo "type: $BUILD_TYPE"
echo "workspace: $CURDIR"
echo "artifact url: $ARTIFACTORY_URL"
echo "##########################################################"
conan install ./cmake --install-folder=./output/build/conan -s build_type=$BUILD_TYPE -r artifact
if [ $? -ne 0 ]; then
echo "build dependency error, please check 'cmake/conanfile.py' file or nexus-artifactory-server"
exit 1
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/zhongling_yuxiu_at_west_point/mult_timer.git
git@gitee.com:zhongling_yuxiu_at_west_point/mult_timer.git
zhongling_yuxiu_at_west_point
mult_timer
mult_timer
master

搜索帮助