[Qa-jenkins-scm] [jenkins.debian.net] 01/01: only create directory if it doesnt exist

Holger Levsen holger at moszumanska.debian.org
Mon Aug 3 16:54:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit e41a862c7f97ac5749d4797fc227124ea3f743a1
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Aug 3 18:53:01 2015 +0200

    only create directory if it doesnt exist
---
 update_jdn.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/update_jdn.sh b/update_jdn.sh
index 2a86582..e83520c 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -80,9 +80,9 @@ if ! test -h /chroots; then
 fi
 
 # create homedirectories for build hosts (needed for jenkins remote nodes)
+NODEHOME=/srv/jenkins/pseudo-hosts/$HOSTNAME-armhf-rb
 case $HOSTNAME in
-	bpi0|hb0|wbq0|cbxi4pro0)	sudo mkdir /srv/jenkins/pseudo-hosts/$HOSTNAME-armhf-rb
-					sudo chown jenkins.jenkins /srv/jenkins/pseudo-hosts/$HOSTNAME-armhf-rb
+	bpi0|hb0|wbq0|cbxi4pro0)	[ -d $NODEHOME ] || ( sudo mkdir $NODEHOME ; sudo chown jenkins.jenkins $NODEHOME )
 					;;
 	*)				;;
 esac

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list