From 1f633f4f927b5f53d577c59be2b7648d5d0f5180 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Exit immediately if mock fails --- smock/smock.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/smock/smock.sh b/smock/smock.sh index 41b7888..72b5e17 100755 --- a/smock/smock.sh +++ b/smock/smock.sh @@ -55,9 +55,14 @@ do mock -r $DIST-$ARCH --resultdir $LOCALREPO/scratch $SRPM + if [ $? != 0 ]; then + echo "Build failed, leaving logs in $LOCALREPO/scratch" + exit $? + fi mv $LOCALREPO/scratch/*.src.rpm $LOCALREPO/$DIST/src/SRPMS mv $LOCALREPO/scratch/*.rpm $LOCALREPO/$DIST/$ARCH/RPMS mv $LOCALREPO/scratch/*.log $LOCALREPO/$DIST/$ARCH/logs/$SRPM/ done createrepos + -- 1.8.3.1