mirror of
https://github.com/mii443/merkle.rs.git
synced 2025-08-22 16:05:30 +00:00
pin protoc to 3.5.1
This commit is contained in:
committed by
Romain Ruetschi
parent
2356719da9
commit
622a8d7256
@ -1,8 +1,22 @@
|
||||
#!/usr/bin/bash
|
||||
set -e
|
||||
|
||||
if [ ! -d "$HOME/protobuf/lib" ]; then
|
||||
wget https://github.com/google/protobuf/archive/v3.5.1.tar.gz
|
||||
tar -xzvf v3.5.1.tar.gz
|
||||
cd protobuf-3.5.1 && ./autogen.sh && ./configure --prefix=$HOME/protobuf && make && make install
|
||||
check_protoc_version () {
|
||||
version="libprotoc $1"
|
||||
PROTOC="$HOME/protobuf/bin/protoc"
|
||||
if [ -f $PROTOC ]; then
|
||||
this_version=`$PROTOC --version`
|
||||
return `[ "$version" = "$this_version" ]`
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if check_protoc_version '3.5.1'; then
|
||||
echo protoc version 3.5.1 detected.
|
||||
exit
|
||||
fi
|
||||
|
||||
wget https://github.com/google/protobuf/archive/v3.5.1.tar.gz
|
||||
tar -xzvf v3.5.1.tar.gz
|
||||
cd protobuf-3.5.1 && ./autogen.sh && ./configure --prefix=$HOME/protobuf && make && make install
|
||||
|
Reference in New Issue
Block a user