X-Git-Url: https://vcs.fsf.org/?p=fsf-giving-guide.git;a=blobdiff_plain;f=git-hooks%2Fpost-update;h=340c0110c306b60948d5ae6da03f5817fb86a740;hp=b737c4b9560b23b4698ff3b7488eaec06246c4fb;hb=1b54f53eb6fc8896f03feb892cf4d6de544ea865;hpb=8a3bd7bb78d767536af02f2c51704efb5410d8d1 diff --git a/git-hooks/post-update b/git-hooks/post-update index b737c4b..340c011 100755 --- a/git-hooks/post-update +++ b/git-hooks/post-update @@ -26,12 +26,10 @@ echo Updating local checkout... git pull git reset --hard $1 echo Copying files... -# A lot of files that we *don't* want to copy, so we're selective. -rsync -az --delete --prune-empty-dirs \ - --include='*/' --include='givingguide.html' --include='js/*' \ - --include='images/*' --include='fonts/*' --include='*.css' --exclude='*' \ - /home/git/local/checkouts/fsf-giving-guide \ - vcshookuser@fsf.org:/var/www/ #2>/dev/null +# copy the v8 etc dirs. +# note, the -f arg is a trick documented in the rsync man page +rsync -vazm --delete --include='/v[[:digit:]]/***' --include='/v[[:digit:]][[:digit:]]/***' \ + -f 'hide,! */' /home/git/local/checkouts/fsf-giving-guide/ vcshookuser@fsf.org:/var/www/fsf-giving-guide echo Fixing permissions on webserver... -ssh vcshookuser@fsf.org 'find /var/www/fsf-giving-guide -type f -print0 | xargs -0 chmod 664 && find /var/www/fsf-giving-guide -type d -print0 | xargs -0 chmod 775' # 2>/dev/null +ssh vcshookuser@fsf.org chmod -R ug=rwX,o=rX /var/www/fsf-giving-guide exec git update-server-info