]> xenbits.xensource.com Git - libvirt.git/commitdiff
autobuild.sh: avoid bashism
authorEric Blake <eblake@redhat.com>
Fri, 4 Jun 2010 03:07:09 +0000 (21:07 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 4 Jun 2010 16:03:52 +0000 (10:03 -0600)
* autobuild.sh: Replace 'set -o pipefail' with POSIX alternative.
Reported by Matthias Bolte.

autobuild.sh

index 3379be47f1b81de3a79b375f3e25f8a8cbe154ea..c52747938ad45f17f259d18ee5f0a73cfd7b456d 100755 (executable)
@@ -35,9 +35,14 @@ esac
 make
 make install
 
-set -o pipefail
-make check 2>&1 | tee "$RESULTS"
-make syntax-check 2>&1 | tee -a "$RESULTS"
+# set -o pipefail is a bashism; this use of exec is the POSIX alternative
+exec 3>&1
+st=$(
+  exec 4>&1 >&3
+  { make check syntax-check 2>&1; echo $? >&4; } | tee "$RESULTS"
+)
+exec 3>&-
+test $st = 0
 test -x /usr/bin/lcov && make cov
 
 rm -f *.tar.gz