Make update-makefiles.sh exit if any of the hidl invocations fail
This makes it easier for the user to discover that one (or more) of
their source files contain errors
Test: ran the script
Change-Id: Ibdb1f363d934605f47ca7df0d56bb387a47f7482
diff --git a/update-makefiles.sh b/update-makefiles.sh
index f153a84..d0cb91c 100755
--- a/update-makefiles.sh
+++ b/update-makefiles.sh
@@ -20,7 +20,9 @@
for p in $packages; do
echo "Updating $p";
hidl-gen -Lmakefile -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport $p;
+ rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
hidl-gen -Landroidbp -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport $p;
+ rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
done
# subdirectories of hardware/interfaces which contain an Android.bp file