代码拉取完成,页面将自动刷新
同步操作将从 极简美/mult_timer 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。