1#!/bin/bash 2 3grpc_1_15_1_githash=1a60e6971f428323245a930031ad267bb3142ba4 4 5function build_grpc () { 6 git clone https://github.com/grpc/grpc.git google/grpc 7 cd google/grpc 8 git checkout ${grpc_1_15_1_githash} 9 git submodule update --init 10 make 11 make install prefix=`pwd`/install 12 if [ ! -f ${GRPC_INSTALL_PATH}/lib/libgrpc++_unsecure.so.1 ]; then 13 ln -s ${GRPC_INSTALL_PATH}/lib/libgrpc++_unsecure.so.6 ${GRPC_INSTALL_PATH}/lib/libgrpc++_unsecure.so.1 14 fi 15 cd ../.. 16} 17 18GRPC_INSTALL_PATH=`pwd`/google/grpc/install 19PROTOBUF_DOWNLOAD_PATH=`pwd`/google/grpc/third_party/protobuf 20 21build_grpc 22