diff -NaurdwB ./compile.sh ./compile.sh --- ./compile.sh 2022-08-03 17:47:57.000000000 -0400 +++ ./compile.sh 2022-08-03 20:01:59.000000000 -0400 @@ -7,33 +7,10 @@ # call protoc direclty, if version is not the desired one, download the desired vesrion. - -if [ -f "protoc/bin/protoc" ]; then - PROTOC_BIN="protoc/bin/protoc" -else PROTOC_BIN=`which protoc` -fi echo "using" $PROTOC_BIN -CURRENT_PROTOC_VER=`${PROTOC_BIN} --version` -if [ -z ${PROTOC_BIN} ] || [[ "$CURRENT_PROTOC_VER" != "libprotoc "$DESIRED_PROTO_VERSION ]]; then - # Download and use the latest version of protoc. - if [ "$(uname)" == "Darwin" ]; then - PROTOC_ZIP="protoc-"$DESIRED_PROTO_VERSION"-osx-x86_64.zip" - else - PROTOC_ZIP="protoc-"$DESIRED_PROTO_VERSION"-linux-x86_64.zip" - fi - WGET_BIN=`which wget` - if [[ ! -z ${WGET_BIN} ]]; then - ${WGET_BIN} https://github.com/protocolbuffers/protobuf/releases/download/v"$DESIRED_PROTO_VERSION"/${PROTOC_ZIP} - rm -rf protoc - python -c "import zipfile; zipfile.ZipFile('"${PROTOC_ZIP}"','r').extractall('protoc')" - PROTOC_BIN=protoc/bin/protoc - chmod +x ${PROTOC_BIN} - fi -fi - # Regenerate if [[ ! -z ${PROTOC_BIN} ]]; then # Delete all existing Python protobuf (*_pb2.py) output