summaryrefslogtreecommitdiffstats
path: root/scripts/firstrun/23-repos
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-05-17 23:02:36 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-05-17 23:03:13 +0200
commitfc796019903bb90408012bf8c4d8869ed8dd973d (patch)
treed677d0c00c6172e85996e4bf18be43cb006f9dd2 /scripts/firstrun/23-repos
parent8efdd6b7b406b3bb7895786bc01507d52c3cf9d1 (diff)
downloaddotfiles-fc796019903bb90408012bf8c4d8869ed8dd973d.tar.gz
dotfiles-fc796019903bb90408012bf8c4d8869ed8dd973d.tar.xz
dotfiles-fc796019903bb90408012bf8c4d8869ed8dd973d.zip
Init scripts: extend repo setups + finetune the script
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'scripts/firstrun/23-repos')
-rw-r--r--scripts/firstrun/23-repos9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/firstrun/23-repos b/scripts/firstrun/23-repos
index a61c04d..560da55 100644
--- a/scripts/firstrun/23-repos
+++ b/scripts/firstrun/23-repos
@@ -10,11 +10,14 @@ POI=$(cat <<-EOF
gwork/resource-agents~~~~~git://github.com/ClusterLabs/resource-agents.git
gwork/resource-agents-my~~git@jnpkrn.github.com:jnpkrn/resource-agents.git
gwork/fence-agents~~~~~~~~git://git.fedorahosted.org/fence-agents.git
+ gwork/libqb~~~~~~~~~~~~~~~git://github.com/asalkeld/libqb.git
+ gwork/corosync~~~~~~~~~~~~git://github.com/corosync/corosync.git
EOF
)
# grep: suppress also broken pipe message (?)
-yum list installed | grep -qs ${VCSCMD} || su -c "yum install ${VCSCMD}"
+yum list installed 2>/dev/null | grep -qs ${VCSCMD} \
+ || su -c "yum install ${VCSCMD}"
mkdir -p "${DESTROOT}"
pushd "${DESTROOT}" >/dev/null
@@ -31,7 +34,9 @@ for pkg in ${POI}; do
cd ${bname}
branch=$(${VCSCMD} for-each-ref --count=1 --sort=-committerdate \
--format='%(refname:short)' refs/heads/)
- ${VCSCMD} branch ${branch}
+ if [ "$(${VCSCMD} rev-parse --abbrev-ref HEAD)" != "${BRANCH}" ]; then
+ ${VCSCMD} checkout ${branch}
+ fi
popd >/dev/null
done