From: Daniel P. Berrange <"Daniel P. Berrange "> Date: Thu, 11 Sep 2008 12:03:09 +0000 (-0400) Subject: Exit immediately if mock fails X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=1f633f4f927b5f53d577c59be2b7648d5d0f5180;p=fedora-mingw.git Exit immediately if mock fails --- 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 +