Fix linking grpc on macos but installed along protoc

This commit is contained in:
Shivam Mathur 2023-11-27 17:08:32 +05:30
parent eea39ea741
commit 1874353919
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -24,8 +24,10 @@ get_grpc_tag() {
add_grpc_php_plugin_brew() { add_grpc_php_plugin_brew() {
. "${0%/*}"/tools/brew.sh . "${0%/*}"/tools/brew.sh
configure_brew configure_brew
[ -e /usr/local/bin/protoc ] && sudo mv /usr/local/bin/protoc /tmp/protoc && sudo mv /usr/local/include/google /tmp
brew install grpc brew install grpc
brew link --force --overwrite grpc >/dev/null 2>&1 brew link --force --overwrite grpc >/dev/null 2>&1
[ -e /tmp/protoc ] && sudo mv /tmp/protoc /usr/local/bin/protoc && sudo mv /tmp/google /usr/local/include/
grpc_tag="v$(brew info grpc | grep "grpc:" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")" grpc_tag="v$(brew info grpc | grep "grpc:" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+")"
license_path="$(brew --prefix grpc)/LICENSE" license_path="$(brew --prefix grpc)/LICENSE"
} }