test-rebuild.sh: drop branch arg and switch to os version branch

need to support epel later
This commit is contained in:
Jens Petersen 2013-11-20 19:50:50 +09:00
parent 585415b5d9
commit 493f56fc43

View File

@ -4,7 +4,7 @@
# In a pkg dir run
# $ ./test-rebuild.sh
# or clone a pkg branch:
# $ ./test-rebuild.sh [pkg] [branch]
# $ ./test-rebuild.sh [pkg]
set -e
@ -22,12 +22,12 @@ ARCH=$(arch)
#fi
eval $(grep VERSION_ID /etc/os-release)
BRANCH="f$VERSION_ID"
case $VERSION_ID in
21) BRANCH=master ;;
*) BRANCH="f$VERSION_ID" ;;
esac
# maybe use BRANCH here too?
if [ -n "$2" ]; then
fedpkg switch-branch $2
fi
fedpkg switch-branch $BRANCH
if [ "* $BRANCH" != "$(git branch --list $BRANCH)" ]; then
echo "Git branch does not match Fedora installation!"