From 6d6f7160b1954ca1b9c111ee24e830d605bfc5d0 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Wed, 22 Nov 2017 21:19:19 -0500 Subject: [PATCH 1/1] fix rsync command to make more sense Files have accumulated over time and I had to adjust the rsync command for v8 to work, and the includes and excludes didn't make a lot of sense. So, just simplify it to include all the v8,v9, etc directories and everything in them. Also, replace the chmod command with a simpler one. --- git-hooks/post-update | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/git-hooks/post-update b/git-hooks/post-update index 4a1bb33..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='*.html' --include='*.js' \ - --include='img/**' --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 -- 1.9.1