代码拉取完成,页面将自动刷新
#!/bin/sh
set -e
SRC_PATH=$(pwd)
print_help()
{
echo "--------------------------build kzstar Parameters:------------------------------------"
echo "sh kzstar_build.sh install | 编译安装zstd和kzstar"
echo "sh kzstar_build.sh clean | 清理环境"
echo "--------------------------------------------------------------------------------------"
return
}
clear_env()
{
rm -rf /usr/local/kzstar/
rm -rf ./zstar.h
rm -rf ./libsecurec.so
rm -rf ./libzstar.so
make clean
}
unpackzstar(){
print_help
rm -rf /usr/local/kzstar/
mkdir -p /usr/local/kzstar/lib
mkdir -p /usr/local/kzstar/include
unzip BoostKit-KZstar_1.0.0.zip
cp ./zstar.h /usr/local/kzstar/include
cp ./libsecurec.so /usr/local/kzstar/lib
cp ./libzstar.so /usr/local/kzstar/lib
}
buildzstd(){
make -j64
cp ./lib/libzstd.so.1.5.2 /usr/local/kzstar/lib
cp ./lib/zstd.h /usr/local/kzstar/include
cd /usr/local/kzstar/lib
ln -s libzstd.so.1.5.2 libzstd.so
ln -s libzstd.so.1.5.2 libzstd.so.1
cd -
}
function main()
{
if [ "$1" = "install" ];then
echo "build zstar"
unpackzstar
buildzstd
elif [ "$1" = "help" ];then
print_help
elif [ "$1" = "clean" ];then
echo "clean evp"
clear_env
else
print_help
fi
}
main "$@"
exit $?
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。