test-rebuild.sh: epel support

This commit is contained in:
Jens Petersen 2013-11-28 19:16:42 +09:00
parent 493f56fc43
commit 649621d68e
1 changed files with 13 additions and 5 deletions

View File

@ -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