[Gnucash-changes] r11790 - meta/hooks - Add conditional hooks-dir
checkout auto-update.
Joshua Sled
jsled at cvs.gnucash.org
Wed Nov 2 16:07:41 EST 2005
Author: jsled
Date: 2005-11-02 16:07:40 -0500 (Wed, 02 Nov 2005)
New Revision: 11790
Modified:
meta/hooks/post-commit
Log:
Add conditional hooks-dir checkout auto-update.
Modified: meta/hooks/post-commit
===================================================================
--- meta/hooks/post-commit 2005-11-02 20:32:42 UTC (rev 11789)
+++ meta/hooks/post-commit 2005-11-02 21:07:40 UTC (rev 11790)
@@ -37,7 +37,8 @@
# If you're having unexpected problems with a hook program, the
# culprit may be unusual (or missing) environment variables.
#
-# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
# the Subversion repository at
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/
@@ -46,5 +47,11 @@
REPOS="$1"
REV="$2"
-/home/svn/repo/hooks/commit-email.pl "$REPOS" "$REV" gnucash-changes at gnucash.org
-#log-commit.py --repository "$REPOS" --revision "$REV"
+COMMIT_EMAIL=${REPOS}/hooks/commit-email.pl
+${COMMIT_EMAIL} "$REPOS" "$REV" gnucash-changes at gnucash.org
+
+# 2005-11-02, jsled: If the commit changed meta/hooks/, then update the repository's hooks dir.
+SVNLOOK=/usr/bin/svnlook
+EGREP=/bin/egrep
+[ `${SVNLOOK} changed ${REPOS} -r ${REV} | ${EGREP} -c "^....meta/hooks"` != 0 ] && \
+ cd ${REPOS}/hooks && svn update
More information about the gnucash-changes
mailing list