publish
5a7f21f1
 #!/bin/sh
36c781c7
 set -e # stop if we encounter an error
 
1265ca47
 # pull the latest changes
0ee53711
 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
 
 # clean up the working directory
8cb10c5c
 make clean
1265ca47
 
 # actually build the site
0227f5cc
 make -j3
5a7f21f1
 
c7862807
 # don't copy over stuff with permissions that make it useless
8fab2411
 chmod -R a+r *
0ee53711
 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
13811e24
 
 echo "Forcing mirror update"
f366190d
 ssh www-master.torproject.org '
0ee53711
 	(
f366190d
 	 find /srv/www-master.torproject.org/htdocs ! -perm -444 -print0 | xargs -0 --no-run-if-empty chmod -v a+r ||
3cabf5f5
 	 ( echo >&2 "There are unreadable files in /srv/www-master.torproject.org/htdocs, not triggering mirror run."; exit 1)
0ee53711
 	) &&
f366190d
 	echo "Triggering mirror run" &&
0ee53711
 	/home/mirroradm/bin/trigger-mirrors'