RUNME 804 B

12345678910111213141516171819202122232425262728
  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 updated protoc, protoc-gen-swift, and
  7. # protoc-gen-swiftgrpc binaries and assumes that protoc-gen-swift
  8. # is installed in $HOME/local/bin.
  9. if [ ! -d "googleapis" ]; then
  10. curl -L -O https://github.com/googleapis/googleapis/archive/master.zip
  11. unzip master.zip
  12. rm -f master.zip
  13. mv googleapis-master googleapis
  14. fi
  15. protoc \
  16. google/cloud/language/v1/language_service.proto \
  17. google/api/annotations.proto \
  18. google/api/http.proto \
  19. google/protobuf/descriptor.proto \
  20. -Igoogleapis \
  21. -I../common/include \
  22. --swift_out=googleapis \
  23. --swiftgrpc_out=googleapis
  24. # move Swift files to the Sources directory
  25. find googleapis -name "*.swift" -exec mv {} Sources \;