1 Star 0 Fork 1

Joy/hyperbench

forked from hyperbench/hyperbench 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.sh 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
刘小美 提交于 2022-03-31 11:30 . chore(release): 1.0.0
#!/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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/cuiyuchain/hyperbench.git
git@gitee.com:cuiyuchain/hyperbench.git
cuiyuchain
hyperbench
hyperbench
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385