]> git.donarmstrong.com Git - neurodebian.git/commitdiff
ENH: nd_build returns with non-0 if any build fails
authorYaroslav Halchenko <debian@onerussian.com>
Tue, 20 Sep 2011 02:44:58 +0000 (22:44 -0400)
committerNeuroDebian Mega-user <neurodebian@head2.hydra.dartmouth.edu>
Tue, 20 Sep 2011 02:44:58 +0000 (22:44 -0400)
tools/nd_build
tools/nd_build4allnd

index 562b8aa90a0cf855bda10414b8f34b70326134f9..baf77a8d84cbac2765b172332af47609cacfb038 100755 (executable)
@@ -77,6 +77,8 @@ else
   shift; shift; shift; shift
 fi
 
+# failed will be set to 1 if any build fails
+failed=
 for a in $arch; do
   # default
   options="$opts"
@@ -98,8 +100,7 @@ for a in $arch; do
              --buildresult . \
              --logfile "${buildfile}" \
              $options \
-             "$@" && status='OK' || status='FAILED'
-
+             "$@" && status='OK' || { status='FAILED'; failed=1; }
   timeinfo=$(tail -n 1 "${tsfile}")
   # Update the summary of builds
   touch summary.build                               # Assure existence
@@ -107,3 +108,5 @@ for a in $arch; do
   echo -e "${buildfile}\t$status\t$timeinfo" >> summary.build  # Add current one
   rm -f "${tsfile}"
 done
+# Exit with failure status if any built failed
+[ -z $failed ] || exit 1
index 77e7ce908541a86cf58264748a6dd989af1fff78..466271d778eeb7023074fb9f01c54ac9ddce71a1 100755 (executable)
@@ -22,5 +22,5 @@ for d in $allnddists; do
   drelease=${d##*-}
 
   bpdsc=$(nd_backport $drelease $dscfile | tail -n1 | sed -e 's/^.* //g')
-  nd_build $dfamily $drelease $bpdsc "$@"
+  nd_build $dfamily $drelease $bpdsc "$@" || :
 done