summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-12-14 19:04:37 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-14 19:04:37 +0100
commitce635cfda99d608e30f0502ff19244b149e9990e (patch)
treebf041367530ee3a0bd9fc26318cef1442e9185d0
parent26cfaac51d14981491eab7a411db1f6a1a4e6d1f (diff)
downloadjenkins.debian.net-ce635cfda99d608e30f0502ff19244b149e9990e.tar.xz
deploy userContent with correct permissions
-rwxr-xr-xupdate_jdn.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index ad06d7aa..1a6c6bf9 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -424,7 +424,11 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
# samuel, lunar and josch committed with several commiters, only display one
grep -v -e "samuel.thibault@ens-lyon.org" -e Lunar -e "j.schauer@email.de" -e "mattia@mapreri.org" $TMPFILE | sudo tee -a /var/lib/jenkins/userContent/THANKS > /dev/null
rm $TMPFILE
- sudo cp -pr userContent /var/lib/jenkins/
+ TMPDIR=$(mktemp -d)
+ sudo cp -pr userContent $TMPDIR/
+ sudo chown jenkins.jenkins $TMPDIR
+ sudo cp -vpr $TMPDIR/userContent /var/lib/jenkins/
+ sudo rm -r $TMPDIR
cd /var/lib/jenkins/userContent/
ASCIIDOC_PARAMS="-a numbered -a data-uri -a iconsdir=/etc/asciidoc/images/icons -a scriptsdir=/etc/asciidoc/javascripts -b html5 -a toc -a toclevels=4 -a icons -a stylesheet=$(pwd)/theme/debian-asciidoc.css"
[ about.html -nt README ] || asciidoc $ASCIIDOC_PARAMS -o about.html README
@@ -435,8 +439,6 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
mv THANKS .THANKS
rm TODO README INSTALL CONTRIBUTING
sudo chown jenkins.jenkins /var/lib/jenkins/userContent/*html
- sudo chown jenkins.jenkins /var/lib/jenkins/userContent/
- sudo chown jenkins.jenkins /var/lib/jenkins/userContent/reproducible
explain "user content for jenkins updated."
fi