#!/bin/bash
set -euo pipefail
set -x
runfiles=${BASH_SOURCE[0]}.runfiles

protoc="$1"
shift
nanopb="$1"
shift

if [ ! -x "$nanopb" ]
then
    nanopb="$runfiles/zoox/$nanopb"
fi

#exec "${runfiles}/protobuf_archive/${protoc}"     "--plugin=protoc-gen-nanopb=${nanopb}" "$@"
exec "${runfiles}/protobuf_archive_py3/${protoc}" "--plugin=protoc-gen-nanopb=${nanopb}" "$@"
