summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-03 18:53:01 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-03 18:53:01 +0200
commite41a862c7f97ac5749d4797fc227124ea3f743a1 (patch)
treea4ad2dd35c5a57cd4bb6f4e078ce54ff92a4a8ce
parent413fd60c2f65b8651a975de87e415a06ac464d4a (diff)
downloadjenkins.debian.net-e41a862c7f97ac5749d4797fc227124ea3f743a1.tar.xz
only create directory if it doesnt exist
-rwxr-xr-xupdate_jdn.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 2a865825..e83520c2 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