aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/distrib/check_nanopb_output.sh
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-02-23 17:38:01 -0800
committerGravatar David Garcia Quintas <dgq@google.com>2016-02-23 17:43:51 -0800
commite86b4573fefc73f90c4136ebde9395bd15346276 (patch)
tree3cdcea9e286147062e92a3c94ff33893db3f01ad /tools/distrib/check_nanopb_output.sh
parent0d2df65c4120aebbe63f84cd316fc7b8068cf067 (diff)
fixed check nanopb sanity script
Diffstat (limited to 'tools/distrib/check_nanopb_output.sh')
-rwxr-xr-xtools/distrib/check_nanopb_output.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh
index 241a3a5ce3..5f49ebb93e 100755
--- a/tools/distrib/check_nanopb_output.sh
+++ b/tools/distrib/check_nanopb_output.sh
@@ -32,7 +32,7 @@ set -ex
apt-get install -y autoconf automake libtool curl python-virtualenv
-readonly NANOPB_TMP_OUTPUT="${LOCAL_GIT_ROOT}/gens/src/proto/grpc/lb/v0"
+readonly NANOPB_TMP_OUTPUT="$(mktemp -d)"
# install protoc version 3
pushd third_party/protobuf
@@ -62,10 +62,7 @@ PATH="$PROTOC_PATH:$PATH" ./tools/codegen/core/gen_load_balancing_proto.sh \
$NANOPB_TMP_OUTPUT
# compare outputs to checked compiled code
-diff -rq $NANOPB_TMP_OUTPUT src/core/proto/grpc/lb/v0
-if [ $? != 0 ]; then
+if ! diff -r $NANOPB_TMP_OUTPUT src/core/proto/grpc/lb/v0; then
echo "Outputs differ: $NANOPB_TMP_OUTPUT vs src/core/proto/grpc/lb/v0"
- exit 1
+ exit 2
fi
-
-rm -Rf "${LOCAL_GIT_ROOT}/gens"