Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
set -e
GRPC_FORMULA_URL="https://raw.githubusercontent.com/grpc/homebrew-grpc/bcff6876c0f692508e394ba01801e3aced083395/Formula/grpc.rb"
GOOGLE_PROTOBUF_FORMULA_URL="https://raw.githubusercontent.com/grpc/homebrew-grpc/bcff6876c0f692508e394ba01801e3aced083395/Formula/google-protobuf.rb"
PROTOC_GEN_GRPC_JAVA_URL="http://search.maven.org/remotecontent?filepath=io/grpc/protoc-gen-grpc-java/1.1.2/protoc-gen-grpc-java-1.1.2-osx-x86_64.exe"
PROTOC_GEN_GRPC_JAVA_PATH="/usr/local/bin/protoc-gen-grpc-java"
brew unlink google-protobuf grpc
brew install --without-python "${GOOGLE_PROTOBUF_FORMULA_URL}"
brew install "${GRPC_FORMULA_URL}"
brew switch google-protobuf 3.1.0
brew switch grpc 1.1.2
brew pin google-protobuf grpc
curl --location "${PROTOC_GEN_GRPC_JAVA_URL}" > "${PROTOC_GEN_GRPC_JAVA_PATH}"
chmod 755 "${PROTOC_GEN_GRPC_JAVA_PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment