From 9bcbaa8869883d53f506c8ada269ead46aedc743 Mon Sep 17 00:00:00 2001 From: Zex Li Date: Sun, 25 Jun 2017 21:32:11 -0500 Subject: [PATCH] Add build failure message (#2397) * Add build failure message * quit on error --- build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 6a1c7d29d..fd8fc0d5e 100755 --- a/build.sh +++ b/build.sh @@ -5,6 +5,7 @@ # In most cases, type make will give what you want. # See additional instruction in doc/build.md +set -e if make; then echo "Successfully build multi-thread xgboost" @@ -14,7 +15,11 @@ else echo "Start to build single-thread xgboost" make clean_all make config=make/minimum.mk - echo "Successfully build single-thread xgboost" - echo "If you want multi-threaded version" - echo "See additional instructions in doc/build.md" + if [ $? -eq 0 ] ;then + echo "Successfully build single-thread xgboost" + echo "If you want multi-threaded version" + echo "See additional instructions in doc/build.md" + else + echo "Failed to build single-thread xgboost" + fi fi