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