forked from diplomacy/research
-
Notifications
You must be signed in to change notification settings - Fork 3
/
run_build_protobuf.sh
executable file
·34 lines (31 loc) · 1.09 KB
/
run_build_protobuf.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
#!/bin/bash
if [ ! -d "$HOME/.protobuf" ]; then
wget https://github.com/google/protobuf/archive/v3.6.1.zip
unzip v3.6.1.zip
rm -Rf v3.6.1.zip
cd protobuf-3.6.1/
./autogen.sh
./configure --prefix=$HOME/.protobuf
make
make install
cd ..
rm -Rf protobuf-3.6.1
echo "Done installing protobuf 3.6.1"
else
echo "Protobuf is already installed in ~/.protobuf"
fi
echo ""
echo "Add the following lines to your .bashrc"
echo "-------------------------------------------"
echo "# Protobuf"
echo 'export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp'
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.protobuf/lib'
echo 'export LIBRARY_PATH=$LIBRARY_PATH:$HOME/.protobuf/lib'
echo 'export CPATH=$HOME/.protobuf/include:$CPATH'
echo 'export PROTOC=~/.protobuf/bin/protoc'
echo 'alias protoc=~/.protobuf/bin/protoc'
echo "-------------------------------------------"
echo "If you have an error, run the following:"
echo "apt-get install -y dh-autoreconf autoconf automake libtool curl make g++ unzip"
echo ""
echo "If you want to reinstall, remove the ~/.protobuf directory"