[ghc-rpm-macros] test-rebuild.sh: epel support

Jens Petersen petersen at fedoraproject.org
Thu Nov 28 10:16:54 UTC 2013


commit 649621d68ef75aa26c993882154677df5069cc9d
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Nov 28 19:16:42 2013 +0900

    test-rebuild.sh: epel support

 tests/test-rebuild.sh |   18 +++++++++++++-----
 1 files 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


More information about the scm-commits mailing list