switch order of shoetool items
[fsf-giving-guide.git] / git-hooks / post-update
CommitLineData
92541b22
IK
1#!/bin/bash
2#
3# An example hook script to prepare a packed repository for use over
4# dumb transports.
5#
6# To enable this hook, rename this file to "post-update".
7
8local_checkout=/home/git/local/checkouts/fsf-giving-guide
9
10case $1 in
11 refs/heads/master)
12 ;;
13 *)
14 echo
15 echo "use the 'master' branch to update the gift giving site."
16 echo
17 exit 0
18 ;;
19esac
20
21unset GIT_DIR
22echo Deploying to fsf.org...
23
24cd $local_checkout
25echo Updating local checkout...
26git pull
27git reset --hard $1
28echo Copying files...
6d6f7160
IK
29# copy the v8 etc dirs.
30# note, the -f arg is a trick documented in the rsync man page
31rsync -vazm --delete --include='/v[[:digit:]]/***' --include='/v[[:digit:]][[:digit:]]/***' \
32 -f 'hide,! */' /home/git/local/checkouts/fsf-giving-guide/ vcshookuser@fsf.org:/var/www/fsf-giving-guide
92541b22 33echo Fixing permissions on webserver...
6d6f7160 34ssh vcshookuser@fsf.org chmod -R ug=rwX,o=rX /var/www/fsf-giving-guide
92541b22 35exec git update-server-info