代码拉取完成,页面将自动刷新
同步操作将从 openEuler/fastblock 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
buildtype="Release"
component="osd"
usage() {
echo "Usage: $0 [options]"
echo "Options:"
echo " -t, --buildtype : can be Release or Debug"
echo " -c, --component : can be osd or monitor"
exit 1
}
if [ "$#" -eq 0 ] || [ "$1" = "--help" ]; then
usage
fi
# Loop through the command-line arguments
while [ "$#" -gt 0 ]; do
case "$1" in
-t|--buildtype)
shift
buildtype="$1"
;;
-c|--component)
shift
component="$1"
;;
*)
echo "Unknown argument: $1"
usage
;;
esac
shift
done
echo $buildtype
echo $component
root="$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)"
if [[ -z ${CC} ]]; then export CC=/usr/bin/gcc; fi
if [[ -z ${CXX} ]]; then export CXX=/usr/bin/g++; fi
(cd $root/src/msg/demo && ./gen.sh)
(cd $root/proto && ./build.sh)
if [ "$component" = "monitor" ]; then
echo "build fastblock(fastblock-mon、fastblock-client) Golang code"
(cd $root/monitor && make)
exit 0
fi
if [ "$component" = "osd" ]; then
echo "build fastblock(fastblock-osd、fastblock-vhost) C/C++ code"
cmake -DCMAKE_BUILD_TYPE=$buildtype \
-B$root/build \
-H$root \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
"$@"
(cd $root/build && make -j `grep -c ^processor /proc/cpuinfo`)
exit 0
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。