代码拉取完成,页面将自动刷新
同步操作将从 PrimiHub/PrimiHub 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
set -x
set -e
PYTHON_BIN=python3
if ! command -v python3 >/dev/null 2>&1; then
if ! command -v python >/dev/null 2>&1; then
echo "please install python3"
exit
else
PYTHON_BIN=python
fi
fi
U_V1=`$PYTHON_BIN -V 2>&1|awk '{print $2}'|awk -F '.' '{print $1}'`
U_V2=`$PYTHON_BIN -V 2>&1|awk '{print $2}'|awk -F '.' '{print $2}'`
U_V3=`$PYTHON_BIN -V 2>&1|awk '{print $2}'|awk -F '.' '{print $3}'`
echo your python version is : "$U_V1.$U_V2.$U_V3"
if ! [ "${U_V1}" = 3 ] && [ "${U_V2}" > 6 ]; then
echo "python version must > 3.6"
exit
fi
PYTHON_CONFIG_CMD="python$U_V1.$U_V2-config"
if ! command -v ${PYTHON_CONFIG_CMD} >/dev/null 2>&1; then
echo "please install python$U_V1.$U_V2-dev"
exit
fi
#get python include path
PYTHON_INC_CONFIG=`${PYTHON_CONFIG_CMD} --includes | awk '{print $1}' |awk -F'-I' '{print $2}'`
if [ ! -d "${PYTHON_INC_CONFIG}" ]; then
echo "${PYTHON_CONFIG_CMD} get python include path failed"
exit -1
fi
# link python include path into workspace
pushd third_party
rm -f python_headers
ln -s ${PYTHON_INC_CONFIG} python_headers
popd
#get python link option
CONFIG=`${PYTHON_CONFIG_CMD} --ldflags` && NEWLINE="[\"${CONFIG}\"] + [\"-lpython$U_V1.$U_V2\"]"
# Compatible with MacOS
sed -e "s|PLACEHOLDER-PYTHON3.X-CONFIG|${NEWLINE}|g" BUILD.bazel > BUILD.bazel.tmp && mv BUILD.bazel.tmp BUILD.bazel
echo "done"
if [ ! -d "localdb" ]; then
mkdir localdb
fi
if [ ! -d "log" ]; then
mkdir log
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。