summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-10-16 15:32:28 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-10-16 15:32:28 -0400
commita8c618de32c0a50860c5b8f6c4ecf72d88b651e0 (patch)
treeb769a7ead5e40e5f12a5f2950a303c00bd4f1939
parent0dc63f86e4c17005d8b20f242d474ca59deac60a (diff)
downloadbuild_tools-a8c618de32c0a50860c5b8f6c4ecf72d88b651e0.zip
build_tools-a8c618de32c0a50860c5b8f6c4ecf72d88b651e0.tar.gz
build_tools-a8c618de32c0a50860c5b8f6c4ecf72d88b651e0.tar.xz
Ensure that failures in mock will stop the script from continuing
-rwxr-xr-xsssd-nightly.sh30
1 files changed, 22 insertions, 8 deletions
diff --git a/sssd-nightly.sh b/sssd-nightly.sh
index e8a1d2c..a457023 100755
--- a/sssd-nightly.sh
+++ b/sssd-nightly.sh
@@ -92,11 +92,18 @@ make srpms >> $LOGFILE 2>&1 || finish 3
cd rpmbuild/SRPMS
echo "===== BUILDING FEDORA 11 i586 =====" >> $LOGFILE
-mock -r fedora-11-i386 sssd-$rpmversion.fc11.src.rpm >> $LOGFILE 2>&1 || \
- (cat /var/lib/mock/fedora-11-i386/result/build.log >> $LOGFILE ; finish 4)
+mock -r fedora-11-i386 sssd-$rpmversion.fc11.src.rpm >> $LOGFILE 2>&1 || failed=1
+if [ $failed ]; then
+ cat /var/lib/mock/fedora-11-i386/result/build.log >> $LOGFILE
+ finish 4
+fi
+
echo "===== BUILDING FEDORA 11 x86_64 =====" >> $LOGFILE
-mock -r fedora-11-x86_64 sssd-$rpmversion.fc11.src.rpm >> $LOGFILE 2>&1 || \
- (cat /var/lib/mock/fedora-11-x86_64/result/build.log >> $LOGFILE ; finish 5)
+mock -r fedora-11-x86_64 sssd-$rpmversion.fc11.src.rpm >> $LOGFILE 2>&1 || failed=1
+if [ $failed ]; then
+ cat /var/lib/mock/fedora-11-x86_64/result/build.log >> $LOGFILE
+ finish 5
+fi
echo "===== CREATING FEDORA 11 i586 YUM REPOSITORY ====" >> $LOGFILE
mkdir -p $repodir/f11/SRPMS
@@ -156,11 +163,18 @@ echo "===== BUILDING RHEL 5 i386 =====" >> $LOGFILE
cd /local/sgallagh/sssd-$datestamp/rpmbuild/SRPMS
mv sssd-$rpmversion.fc11.src.rpm \
sssd-$rpmversion.el5.src.rpm
-mock -r epel-5-i386 sssd-$rpmversion.el5.src.rpm >> $LOGFILE 2>&1 || \
- (cat /var/lib/mock/epel-5-i386/result/build.log >> $LOGFILE ; finish 6)
+mock -r epel-5-i386 sssd-$rpmversion.el5.src.rpm >> $LOGFILE 2>&1 || failed=1
+if [ $failed ]; then
+ cat /var/lib/mock/epel-5-i386/result/build.log >> $LOGFILE
+ finish 6
+fi
+
echo "===== BUILDING RHEL 5 x86_64 =====" >> $LOGFILE
-mock -r epel-5-x86_64 sssd-$rpmversion.el5.src.rpm >> $LOGFILE 2>&1 || \
- (cat /var/lib/mock/epel-5-x86_64/result/build.log >> $LOGFILE ; finish 7)
+mock -r epel-5-x86_64 sssd-$rpmversion.el5.src.rpm >> $LOGFILE 2>&1 || failed=1
+if [ $failed ]; then
+ cat /var/lib/mock/epel-5-x86_64/result/build.log >> $LOGFILE
+ finish 7
+fi
echo "===== CREATING RHEL 5 i586 YUM REPOSITORY ====" >> $LOGFILE
mkdir -p $repodir/rhel5/SRPMS