From: Travis Cross Date: Tue, 18 Feb 2014 21:05:01 +0000 (+0000) Subject: Exit non-zero from build-all on any build failure X-Git-Tag: v1.2.23~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d5eba2ea74f4e6d17ab1f93505e6f7da7b9aeb;p=thirdparty%2Ffreeswitch.git Exit non-zero from build-all on any build failure ./debian/util.sh build-all will do a number of builds in sequence or parallel. We now track if any of those builds fail to return a .changes file and exit non-zero. --- diff --git a/debian/util.sh b/debian/util.sh index b81181fe77..44d64962e8 100755 --- a/debian/util.sh +++ b/debian/util.sh @@ -358,6 +358,7 @@ build_all () { echo; echo; echo; echo trap 'echo "Killing children...">&2; for x in $(jobs -p); do kill $x; done' EXIT if [ "${orig:0:2}" = ".." ]; then + echo "true" > ../log/builds-ok for distro in $distros; do echo "Creating $distro dsc..." >&2 local dsc="$(create_dsc $dsc_opts $distro $orig 2>../log/$distro | tail -n1)" @@ -371,6 +372,8 @@ build_all () { echo "Done building $distro-$arch debs." >&2 if [ "${changes:0:2}" = ".." ]; then echo "$changes" >> ../log/changes + else + echo "false" > ../log/builds-ok fi } & $par || wait @@ -383,6 +386,7 @@ build_all () { [ -z "$modlist" ] || rm -f $modtmp trap - EXIT cat ../log/changes + test "$(cat ../log/builds-ok)" = true || exit 1 } usage () {