From a8bcd3741ff27506319f881a14727ba14ef68e3b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 5 Oct 2012 19:49:32 +0900 Subject: [PATCH] test-rebuild: set -e; require fresh arch dir --- test-rebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test-rebuild b/test-rebuild index 614ec2f..eba4cb0 100755 --- a/test-rebuild +++ b/test-rebuild @@ -1,5 +1,7 @@ #!/bin/sh +set -e + PKG=$1 [ -d "$PKG" -o -f "$PKG.spec" ] || fedpkg clone -a $PKG @@ -11,13 +13,21 @@ if [ -n "$2" ]; then fi sudo yum-builddep $PKG.spec + +ARCH=$(arch) + +if [ -d $ARCH ]; then + echo Please remove $ARCH/ + exit 1 +fi + fedpkg local TMP=test-tmp mkdir -p $TMP/ -cd $(arch) +cd $ARCH PKGS=$(rpm -qp *)