protoc-gen-nanopb-py2 554 B

12345678910111213141516
  1. #!/bin/sh
  2. # This file is used to invoke nanopb_generator.py2 as a plugin
  3. # to protoc on Linux and other *nix-style systems.
  4. #
  5. # The difference from protoc-gen-nanopb is that this executes with Python 2.
  6. #
  7. # Use it like this:
  8. # protoc --plugin=protoc-gen-nanopb=..../protoc-gen-nanopb-py2 --nanopb_out=dir foo.proto
  9. #
  10. # Note that if you use the binary package of nanopb, the protoc
  11. # path is already set up properly and there is no need to give
  12. # --plugin= on the command line.
  13. MYPATH=$(dirname "$0")
  14. exec "$MYPATH/nanopb_generator.py2" --protoc-plugin