代码拉取完成,页面将自动刷新
#!/bin/bash
MacOs=darwin
CentOs=yum
Ubuntu=apt-get
CmakeV=3.21.3
# Compile on MacOs
# Detect Os if it is MacOs
if [[ "$OSTYPE" =~ ^$MacOs ]]; then
# Dependencies
brew install zip unzip &&
brew install openssl cmake
# Compile zsign usign cmake
mkdir build; cd build &&
cmake .. &&
make
# Compile on CentOS
# Detect OS if it is CentOS
elif [ -x /usr/bin/$CentOs ]; then
# Dependencies
yum install openssl-devel -y;
yum install wget zip unzip -y &&
yum group install "Development Tools" -y &&
# Installing Cmake latest
wget -qO- "https://cmake.org/files/v3.21/cmake-$CmakeV-linux-x86_64.tar.gz" | \
tar --strip-components=1 -xz -C /usr/local &&
# Compile zsign using cmake
mkdir build; cd build &&
cmake .. &&
make
# Compile on Ubuntu
# Detect OS if it is ubuntu
elif [ -x /usr/bin/$Ubuntu ]; then
# Dependencies
sudo apt-get install wget zip unzip build-essential checkinstall zlib1g-dev libssl-dev -y &&
# Installing Cmake latest
wget -qO- "https://cmake.org/files/v3.21/cmake-$CmakeV-linux-x86_64.tar.gz" | \
tar --strip-components=1 -xz -C /usr/local &&
# Compile zsign using cmake
mkdir build; cd build &&
cmake .. &&
make
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。