-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·51 lines (44 loc) · 1.29 KB
/
install
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
# Installs required dependencies
LIBDIR="lib"
if [ -x "$(command -v apt-get)" ]; then
sudo apt-get update -y
sudo apt-get install -y autoconf automake libtool curl make g++ clang unzip
fi
# Build and install protobuf
if ! [ -x "$(command -v protoc)" ]; then
echo "Installing protobuf..."
# Check if protoc has already been built from source
if ! [ -f "protobuf/src/protoc" ]; then
# If not, clone and build the library
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf
git submodule update --init --recursive
# See https://github.com/protocolbuffers/protobuf/issues/149
./autogen.sh
./autogen.sh
./configure
make
make check
else
cd protobuf
fi
# Install the protoc compiler and supporting files
sudo make install
sudo ldconfig
cd ..
fi
if ! [ -d "$LIBDIR" ]; then
mkdir $LIBDIR
fi
# Install cm256
if ! [ -d "$LIBDIR/cm256" ]; then
echo "Installing cm256..."
git clone https://github.com/catid/cm256.git $LIBDIR/cm256
fi
# Install spdlog
if ! [ -d "$LIBDIR/spdlog" ]; then
echo "Installing spdlog..."
git clone --verbose https://github.com/gabime/spdlog.git /tmp/spdlog
mv -v /tmp/spdlog/include/spdlog $LIBDIR/
rm -rf /tmp/spdlog
fi