From ce635cfda99d608e30f0502ff19244b149e9990e Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 14 Dec 2015 19:04:37 +0100 Subject: deploy userContent with correct permissions --- update_jdn.sh | 8 +++++--- 1 file 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 -- cgit v1.2.3-70-g09d2