From 649621d68ef75aa26c993882154677df5069cc9d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 28 Nov 2013 19:16:42 +0900 Subject: [PATCH] test-rebuild.sh: epel support --- tests/test-rebuild.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index 2c5169f..17d31db 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -21,11 +21,17 @@ ARCH=$(arch) # exit 1 #fi -eval $(grep VERSION_ID /etc/os-release) -case $VERSION_ID in - 21) BRANCH=master ;; - *) BRANCH="f$VERSION_ID" ;; -esac +if [ -f /etc/os-release ]; then + eval $(grep VERSION_ID /etc/os-release) + case $VERSION_ID in + 21) BRANCH=master ;; + 7.*) BRANCH=el7 ;; + *) BRANCH="f$VERSION_ID" ;; + esac +else +# assume RHEL6 + BRANCH=el6 +fi fedpkg switch-branch $BRANCH @@ -34,6 +40,8 @@ if [ "* $BRANCH" != "$(git branch --list $BRANCH)" ]; then exit 1 fi +git pull + sudo yum-builddep $PKG.spec fedpkg local