summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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