Protobuf model and library code for oaktree
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

install_proto3.sh 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. # Copyright (c) 2016 Red Hat, Inc.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  13. # implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. if [ -z $GOPATH ]; then
  17. echo "oaktreemodel requires a golang environment."
  18. echo "Please set GOPATH and make sure GOPATH/bin is in your PATH."
  19. exit 1
  20. fi
  21. GRPCDIR=$GOPATH/src/github.com/grpc/grpc
  22. GRPCVER=$(curl -L http://grpc.io/release)
  23. mkdir -p $(dirname $GRPCDIR)
  24. git clone -b $GRPCVER https://github.com/grpc/grpc $GRPCDIR
  25. pushd $GRPCDIR
  26. git submodule update --init
  27. make
  28. if [ $(id -u) = '0' ] ; then
  29. SUDO=
  30. else
  31. SUDO=sudo
  32. fi
  33. $SUDO make install
  34. cd third_party/protobuf
  35. $SUDO make install
  36. popd
  37. go get google.golang.org/grpc
  38. go get -u github.com/golang/protobuf/{proto,protoc-gen-go}