diff --git a/tools/build_protobuf b/tools/build_protobuf index b216407c6e..fd2eb5b69b 100755 --- a/tools/build_protobuf +++ b/tools/build_protobuf @@ -1,11 +1,15 @@ #!/bin/bash set -e +if [ -n "$1" ]; then + OUTDIR=`readlink -f "$1"` +fi + cd "$(dirname "$0")" # set up paths INDEX="__init__.py" -GENPATH="../trezorlib/messages" +GENPATH="${OUTDIR:-../trezorlib/messages}" PROTO_PATH="../vendor/trezor-common/protob" PROTO_FILES="types messages"