summaryrefslogtreecommitdiffstats
path: root/scripts/firstrun/20-fedpkg
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-05-17 22:43:36 +0200
committerJan Pokorný <jpokorny@redhat.com>2013-05-17 22:43:36 +0200
commit8efdd6b7b406b3bb7895786bc01507d52c3cf9d1 (patch)
tree821d18c16a545f1a1b8b03ef9feb5a1cdfb5d6c5 /scripts/firstrun/20-fedpkg
parent96cefdc16a87eba982ecbf1274fc77e4135c7361 (diff)
downloaddotfiles-8efdd6b7b406b3bb7895786bc01507d52c3cf9d1.tar.gz
dotfiles-8efdd6b7b406b3bb7895786bc01507d52c3cf9d1.tar.xz
dotfiles-8efdd6b7b406b3bb7895786bc01507d52c3cf9d1.zip
Init scripts: add/extend pkgs/repo setups
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 3cb349b..978e1cd 100644
--- a/scripts/firstrun/20-fedpkg
+++ b/scripts/firstrun/20-fedpkg
@@ -1,4 +1,6 @@
-DESTROOT="${HOME}/wrkspc"
+# vim:ft=sh:
+source config
+DESTROOT="${CFG_DIR_WRKSPC}"
PKGCMD=fedpkg
BUILDSYS=koji
POI=$(cat <<-EOF
@@ -19,7 +21,7 @@ for pkg in ${POI}; do
bname=$(basename ${pkg})
mkdir -p ${dname}
pushd ${dname} >/dev/null
- ${PKGCMD} clone ${bname}
+ test -d ${bname} || ${PKGCMD} clone ${bname}
cd ${bname}
branch=$(${PKGCMD} switch-branch --list | tail -n2 | head -n1 | cut -d/ -f2)
if [ "$(git rev-parse --abbrev-ref HEAD)" != "${BRANCH}" ]; then