pebble/third_party/nanopb/generator/protoc-gen-nanopb-py2
2025-01-27 11:38:16 -08:00

16 lines
554 B
Bash
Executable file

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