From 0ee537113948708df726112c7b39498c454b047d Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 17 Feb 2012 17:11:49 +0000 Subject: [PATCH] Update publish - extend ignore list for rsync - use www-master.torproject.org instead of unqualified vescum - fix recursive chmod to only try to chmod files that need it - supported updating with both git and svn instead of just svn - do not trigger a mirrorrun if there are unreadable files in www-master's docroot --- publish | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/publish b/publish index b6a071f3..567c126c 100755 --- a/publish +++ b/publish @@ -2,7 +2,13 @@ set -e # stop if we encounter an error # pull the latest changes -svn update +if [ -e .svn ] ; then + svn update +elif [ -e .git ] ; then + git svn rebase +else + echo 2>&1 "Cannot figure out which version control thing you're using. Skipping update" +fi # clean up the working directory make clean @@ -12,8 +18,23 @@ make -j3 # don't copy over stuff with permissions that make it useless chmod -R a+r * -rsync --exclude .svn --exclude .deps --exclude svn --exclude dist --exclude releases --exclude torbutton-current.xpi --exclude project -Prvz --delete . vescum:/srv/www-master.torproject.org/htdocs +rsync \ + --exclude .DS_Store \ + --exclude .svn \ + --exclude .git \ + --exclude '.*.sw[po]' \ + --exclude .deps \ + --exclude svn \ + --exclude dist \ + --exclude releases \ + --exclude torbutton-current.xpi \ + --exclude project \ + -Prvz --delete . www-master.torproject.org:/srv/www-master.torproject.org/htdocs echo "Forcing mirror update" -ssh vescum '/home/mirroradm/bin/trigger-mirrors' -ssh vescum chmod g+w -R /srv/www-master.torproject.org/htdocs +ssh -t www-master.torproject.org ' + ( + find /srv/www-master.torproject.org/htdocs ! -perm +444 -print0 | xargs -0 --no-run-if-empty chmod -v a+r || + echo 2>&1 "There are unreadable files in /srv/www-master.torproject.org/htdocs, not triggering mirror run." + ) && + /home/mirroradm/bin/trigger-mirrors'