From dfd6872fc5b025086107903e17d3f686cb8e1501 Mon Sep 17 00:00:00 2001
From: Jondy Zhao <jondy.zhao@gmail.com>
Date: Tue, 7 May 2013 20:50:03 +0800
Subject: [PATCH] Fix no exit when building error

---
 windows/scripts/build-slapos.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/windows/scripts/build-slapos.sh b/windows/scripts/build-slapos.sh
index f92b3be..88ce688 100755
--- a/windows/scripts/build-slapos.sh
+++ b/windows/scripts/build-slapos.sh
@@ -19,16 +19,18 @@ if [[ ! -f buildout.cfg ]] ; then
 extends = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/heads/cygwin-0:/component/slapos/buildout.cfg
 download-cache = /opt/download-cache
 prefix = ${buildout:directory}
-" > buildout.cfg 
+" > buildout.cfg
 fi
 
 if [[ ! -f bootstrap.py ]] ; then
     echo "Download $slapos_home/bootstrap.py"
     python -S -c 'import urllib2;print urllib2.urlopen("http://git.erp5.org/gitweb/slapos.core.git/blob_plain/HEAD:/bootstrap.py").read()' > bootstrap.py
     python -S bootstrap.py
+    (($?)) && echo "SlapOS bootstrap failed." && exit 1
 fi
 
-bin/buildout -v -N || (echo "Buildout SlapOS failed."; exit 1)
+bin/buildout -v -N
+(($?)) && echo "Buildout SlapOS failed." && exit 1
 
 # apply patches
 patch_file=/etc/slapos/patches/slapos-core-format.patch
-- 
2.30.9