diff options
author | root <root@dev.spline.de> | 2009-12-16 15:57:30 +0100 |
---|---|---|
committer | root <root@dev.spline.de> | 2009-12-16 15:57:30 +0100 |
commit | 8fb2a6cc60fc05aba827d7ba141f70c53916d553 (patch) | |
tree | ad5a41e132472592fd51bb1f449266016af3047b | |
parent | 0f4defeb1038f9433536c7edfa7091744e08d3e2 (diff) | |
download | dev-scripts-8fb2a6cc60fc05aba827d7ba141f70c53916d553.tar.gz dev-scripts-8fb2a6cc60fc05aba827d7ba141f70c53916d553.tar.xz dev-scripts-8fb2a6cc60fc05aba827d7ba141f70c53916d553.zip |
add post-commit hook support
-rwxr-xr-x | bin/addproject | 12 |
1 files changed, 12 insertions, 0 deletions
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 <<EOF > ${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} \ |