From 8fb2a6cc60fc05aba827d7ba141f70c53916d553 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Dec 2009 15:57:30 +0100 Subject: add post-commit hook support --- bin/addproject | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bin/addproject') diff --git a/bin/addproject b/bin/addproject index 28ab0f5..3572a28 100755 --- a/bin/addproject +++ b/bin/addproject @@ -75,6 +75,18 @@ main() { rm -f ${tmpfile} fi + eheading "creating subversion post-commit hook" + cat < ${svn_home}/hooks/post-commit +#!/bin/bash + +REPOS="\$1" +REV="\$2" +TRAC_ENV="/var/lib/trac/${project_name}/" + +/usr/bin/python /usr/local/bin/trac-post-commit-hook -p "\$TRAC_ENV" -r "\$REV" +EOF + eexec chmod +x ${svn_home}/hooks/post-commit + eheading "creating new trac project" eexec mysqladmin create ${trac_db} eexec trac-admin ${trac_home} initenv --inherit=${TRAC_INI} ${project_name} \ -- cgit v1.2.3