-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.sh
63 lines (42 loc) · 1.25 KB
/
INSTALL.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/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