summaryrefslogtreecommitdiffstats
path: root/scripts/firstrun/20-fedpkg
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-05-13 17:50:53 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-05-13 17:50:53 +0200
commit13003601621a3fd7f729ce226a3712a67d4f5658 (patch)
tree9c38d0276ae518b4c198881988f5eb11386d045f /scripts/firstrun/20-fedpkg
parent24c32363705bbf534f08a21a7eef5177acab523f (diff)
downloaddotfiles-13003601621a3fd7f729ce226a3712a67d4f5658.tar.gz
dotfiles-13003601621a3fd7f729ce226a3712a67d4f5658.tar.xz
dotfiles-13003601621a3fd7f729ce226a3712a67d4f5658.zip
Init scripts: fedpkg: conservative preparation
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'scripts/firstrun/20-fedpkg')
-rw-r--r--scripts/firstrun/20-fedpkg6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/firstrun/20-fedpkg b/scripts/firstrun/20-fedpkg
index 01fdaba..3cb349b 100644
--- a/scripts/firstrun/20-fedpkg
+++ b/scripts/firstrun/20-fedpkg
@@ -22,8 +22,10 @@ for pkg in ${POI}; do
${PKGCMD} clone ${bname}
cd ${bname}
branch=$(${PKGCMD} switch-branch --list | tail -n2 | head -n1 | cut -d/ -f2)
- ${PKGCMD} switch-branch ${branch}
- ${PKGCMD} prep # incl. downloading source
+ if [ "$(git rev-parse --abbrev-ref HEAD)" != "${BRANCH}" ]; then
+ ${PKGCMD} switch-branch ${branch}
+ ${PKGCMD} prep # incl. downloading source
+ fi
popd >/dev/null
done