publish
5a7f21f1
 #!/bin/sh
36c781c7
 set -e # stop if we encounter an error
 
d5ad0177
 # pull the latest changes
 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
1265ca47
 
d5ad0177
 # clean up the working directory
 make clean
1265ca47
 
d5ad0177
 # actually build the site
 make -j3
5a7f21f1
 
c7862807
 # don't copy over stuff with permissions that make it useless
8fab2411
 chmod -R a+r *
d5ad0177
 rsync \
 	--exclude .DS_Store \
 	--exclude .svn \
 	--exclude .git \
 	--exclude '.*.sw[po]' \
 	--exclude .deps \
 	--exclude svn \
81f0fb78
 	--exclude README \
d5ad0177
 	--exclude dist \
 	--exclude releases \
 	--exclude torbutton-current.xpi \
 	--exclude project \
76165618
 	-Prvz --delete . www-master.torproject.org:/srv/www-master.torproject.org/htdocs
13811e24
 
 echo "Forcing mirror update"
76165618
 ssh www-master.torproject.org '
d5ad0177
 	(
 	 find /srv/www-master.torproject.org/htdocs ! -perm -444 -print0 | xargs -0 --no-run-if-empty chmod -v a+r ||
 	 ( echo >&2 "There are unreadable files in /srv/www-master.torproject.org/htdocs, not triggering mirror run."; exit 1)
 	) &&
 	echo "Triggering mirror run" &&
 	/home/mirroradm/bin/trigger-mirrors'