From b89b7a502282f6110279d9a3ad74106eaa7f5072 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 4 Nov 2016 11:40:27 -0700 Subject: [PATCH] Clean up update_headers.sh. Clean up some output, check for errors from the versioner. Test: tools/update_headers.sh Bug: None Change-Id: Ib398b534a9a8ee6dc6a2b4d90747f628aa911bab --- tools/update_headers.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/update_headers.sh b/tools/update_headers.sh index e5b87f17e..0095d5065 100755 --- a/tools/update_headers.sh +++ b/tools/update_headers.sh @@ -35,11 +35,17 @@ fi HEADERS_INSTALL=$PREBUILTS_DIR/headers if [ -d "$HEADERS_INSTALL" ]; then git -C $PREBUILTS_DIR rm -r --ignore-unmatch $HEADERS_INSTALL - rm -r $HEADERS_INSTALL + if [ -d $HEADERS_INSTALL ]; then + rm -r $HEADERS_INSTALL + fi fi versioner -p versioner/platforms versioner/current versioner/dependencies \ -o $HEADERS_INSTALL +if [ $? -ne 0 ]; then + >&2 echo "Header preprocessing failed" + exit 1 +fi cp ../libc/NOTICE $PREBUILTS_DIR