#!/bin/sh

# $Id: post-commit-www 24 2005-04-21 12:10:50Z mks $

# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit.  Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the 
# following ordered arguments:
#
#   [1] REPOS-PATH   (the path to this repository)
#   [2] REV          (the number of the revision just committed)
#
# The default working directory for the invocation is undefined, so
# the program should set one explicitly if it cares.
#
# Because the commit has already completed and cannot be undone,
# the exit code of the hook program is ignored.  The hook program
# can use the 'svnlook' utility to help it examine the
# newly-committed tree.
#
# On a Unix system, the normal procedure is to have 'post-commit'
# invoke other programs to do the real work, though it may do the
# work itself too.
#
# Note that 'post-commit' must be executable by the user(s) who will
# invoke it (typically the user httpd runs as), and that user must
# have filesystem-level permission to access the repository.
#

## This script updates the Subversion web tree from the trunk
## whenever the repository is updated

## Note that we assume we know what we are doing here ;-)
## Thus this post-commit hook should only be in the web site
## repository!  It is also *very* dangerous to change this
## file as it is updated whenever a commit happens on the web
## tree (as this is what this file does)  If that ever fails,
## the web server would need to manually be updated

cd /home/equine/private/subversion/www || exit

/home/equine/private/subversion/svn/bin/svn update --non-interactive
