[tor-commits] r25446: {website} Update publish - extend ignore list for rsync - use www-mast (website/trunk)

Peter Palfrader peter at palfrader.org
Fri Feb 17 17:11:49 UTC 2012


Author: weasel
Date: 2012-02-17 17:11:49 +0000 (Fri, 17 Feb 2012)
New Revision: 25446

Modified:
   website/trunk/publish
Log:
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

Modified: website/trunk/publish
===================================================================
--- website/trunk/publish	2012-02-17 16:56:55 UTC (rev 25445)
+++ website/trunk/publish	2012-02-17 17:11:49 UTC (rev 25446)
@@ -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 @@
 
 # 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'



More information about the tor-commits mailing list