Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 51 lines (44 sloc) 1.29 KB
# 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