@@ -4,6 +4,7 @@ PROTOBUFF_VERSION=3.19.1
44PB_REL=" https://github.com/protocolbuffers/protobuf/releases"
55PROTOC_ZIP_NAME=protoc-${PROTOBUFF_VERSION} -linux-x86_64.zip
66PROTOC_INSTALL_PATH=$HOME /.local
7+ REPO_ROOT=$( git rev-parse --show-toplevel)
78
89# install unzip on linux if not installed
910if [[ " $OSTYPE " == " linux-gnu" ]]; then
@@ -18,7 +19,7 @@ if [ ! -f ${PROTOC_INSTALL_PATH}/bin/protoc ]; then
1819 curl -LO ${PB_REL} /download/v${PROTOBUFF_VERSION} /${PROTOC_ZIP_NAME}
1920 echo " Unzipping protoc"
2021 unzip -o ${PROTOC_ZIP_NAME} -d ${PROTOC_INSTALL_PATH}
21- chmod +x ${PROTOC_INSTALL_PATH} /bin/protoc
22+ chmod +x ${PROTOC_INSTALL_PATH} /bin/protoc
2223 export PATH=${PROTOC_INSTALL_PATH} /bin:$PATH
2324 echo " Removing protoc zip"
2425 rm ${PROTOC_ZIP_NAME}
3132# install protoc-gen-go
3233if [ ! -f ${GOPATH} /bin/protoc-gen-go ]; then
3334 echo " Installing protoc-gen-go"
34- go install github.com/golang/protobuf/
[email protected] 35+ go install
-modfile= ${REPO_ROOT} /tools.go.mod github.com/golang/protobuf/
[email protected] 3536else
3637 echo " protoc-gen-go already installed at ${GOPATH} /bin/protoc-gen-go"
3738fi
3839
3940# install protoc-gen-go-grpc
4041if [ ! -f ${GOPATH} /bin/protoc-gen-go-grpc ]; then
4142 echo " Installing protoc-gen-go-grpc"
42- go install google.golang.org/grpc/cmd/
[email protected] 43+ go install
-modfile= ${REPO_ROOT} /tools.go.mod google.golang.org/grpc/cmd/
[email protected] 4344else
4445 echo " protoc-gen-go-grpc already installed at ${GOPATH} /bin/protoc-gen-go-grpc"
4546fi
0 commit comments