RUNME 746 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #
  3. # Use this script to regenerate the Protocol Buffer and gRPC files
  4. # needed to build the example.
  5. #
  6. # Note that it requires protoc, protoc-gen-swift, and
  7. # protoc-gen-swiftgrpc binaries.
  8. if [ ! -d "googleapis" ]; then
  9. curl -L -O https://github.com/googleapis/googleapis/archive/master.zip
  10. unzip master.zip
  11. rm -f master.zip
  12. mv googleapis-master googleapis
  13. fi
  14. protoc \
  15. google/cloud/language/v1/language_service.proto \
  16. google/api/annotations.proto \
  17. google/api/http.proto \
  18. google/protobuf/descriptor.proto \
  19. -Igoogleapis \
  20. -I../../Google/common/include \
  21. --swift_out=googleapis \
  22. --swiftgrpc_out=googleapis
  23. # move Swift files to the sources directory
  24. find googleapis -name "*.swift" -exec mv {} NaturalLanguage \;