From 13003601621a3fd7f729ce226a3712a67d4f5658 Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Mon, 13 May 2013 17:50:53 +0200 Subject: Init scripts: fedpkg: conservative preparation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan Pokorný --- scripts/firstrun/20-fedpkg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/firstrun/20-fedpkg') 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 -- cgit