From f279bff6adf21bb1673b3dbddf76becd85272a78 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 12 Oct 2016 19:22:40 +0900 Subject: [PATCH] test-rebuild.sh: use dnf for builddep and only switch-branch if needed --- tests/test-rebuild.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test-rebuild.sh b/tests/test-rebuild.sh index e98d02a..2e25766 100755 --- a/tests/test-rebuild.sh +++ b/tests/test-rebuild.sh @@ -33,7 +33,9 @@ else BRANCH=el6 fi -fedpkg switch-branch $BRANCH +if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then + fedpkg switch-branch $BRANCH +fi if [ "* $BRANCH" != "$(git branch | grep '^*')" ]; then echo "Git branch does not match Fedora installation!" @@ -42,7 +44,8 @@ fi git pull -sudo yum-builddep $PKG.spec +echo Running dnf builddep: +sudo dnf builddep $PKG.spec fedpkg local