summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-04-23 13:36:37 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-23 13:36:37 +0200
commit6fa914ffde761da1b16cd988ab1abd8947ef011c (patch)
tree5f9989c97ce8c8497d0b3da9ef7d1205a20c3ca7
parentaada713bf3ce15edc235748f26bf1ebdc41bb386 (diff)
downloadjenkins.debian.net-6fa914ffde761da1b16cd988ab1abd8947ef011c.tar.xz
fix 'directory already exists' cosmetic problem
-rwxr-xr-xupdate_jdn.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 6f12d867..f2961d50 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -51,8 +51,12 @@ for directory in /schroots /srv/reproducible-results /srv/d-i /srv/live-build ;
sudo chown jenkins.jenkins $directory
fi
done
-sudo mkdir /srv/jenkins
-sudo chown jenkins-adm.jenkins-adm /srv/jenkins
+for directory /srv/jenkins ; do
+ if [ ! -d $directory ] ; then
+ sudo mkdir $directory
+ sudo chown jenkins-adm.jenkins-adm $directory
+ fi
+done
if ! test -h /chroots; then
rmdir /chroots || rm -f /chroots # do not recurse