代码拉取完成,页面将自动刷新
同步操作将从 hyperbench/hyperbench 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/usr/bin/env bash
URL="http://172.16.0.101/hyperbench"
# name will be generate like 'hyperbench_v${VERSION}_${OS}${EXT}'
VERSION="1.0.2"
EXT=".tar.gz"
OS=""
function install() {
name="hyperbench_v${VERSION}_${OS}"
path="${URL}/${name}${EXT}"
rm ${name}${EXT}
rm ${name}
echo "download ${path} ..."
curl -O ${path}
tar xvf ${name}${EXT}
rm ${name}${EXT}
echo "move hyperbench to /usr/local/bin"
mv ${name} /usr/local/bin/hyperbench
if [$? != 0]; then
mv ${name} hyperbench
echo -e "\033[31m Please add hyperbench to path by yourself"
else
echo -e "\033[32mInstall successfully, Please use the command below to initial your test directory: \033[0m "
echo -e "\033[32m\t mkdir test && cd test\033[0m"
echo -e "\033[32m\t hyperbench init \033[0m"
fi
}
function getLinuxReleaseType(){
release=$(cat /etc/*release*)
case ${release} in
*"CentOS Linux release 7"*)
echo "CentOS7"
OS="centos7"
;;
*)
echo "unsupported Linux release: ${release}"
exit 1
;;
esac
}
function getOSType(){
case "$(uname)" in
"Darwin")
echo "Darwin"
OS="darwin"
;;
"Linux")
echo "Linux"
getLinuxReleaseType
;;
*)
echo "Unsupported now"
;;
esac
}
getOSType
install
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。