Skip to content

Instantly share code, notes, and snippets.

@nwjsmith
Created June 1, 2017 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nwjsmith/4ba21c1eb0f2122ca49d0b13f6045be9 to your computer and use it in GitHub Desktop.
Save nwjsmith/4ba21c1eb0f2122ca49d0b13f6045be9 to your computer and use it in GitHub Desktop.
#!/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