aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion
diff options
context:
space:
mode:
authorDexter Morgan <dmorgan@mageia.org>2011-07-05 14:42:43 +0000
committerDexter Morgan <dmorgan@mageia.org>2011-07-05 14:42:43 +0000
commita61f5f60bde2bcd8c2a107c8abd5f7f206d58310 (patch)
treee0e2e8aaa969186edbbf6d119ea4852e1ea51902 /modules/subversion
parentf625d58072505811c8cc1ccdc769b6ab676cf0b9 (diff)
downloadpuppet-a61f5f60bde2bcd8c2a107c8abd5f7f206d58310.tar
puppet-a61f5f60bde2bcd8c2a107c8abd5f7f206d58310.tar.gz
puppet-a61f5f60bde2bcd8c2a107c8abd5f7f206d58310.tar.bz2
puppet-a61f5f60bde2bcd8c2a107c8abd5f7f206d58310.tar.xz
puppet-a61f5f60bde2bcd8c2a107c8abd5f7f206d58310.zip
Add workaround to not send mail from schedbot user
We will be able to remove it as soon as we will use an other send mail hook
Diffstat (limited to 'modules/subversion')
-rw-r--r--modules/subversion/templates/hook_commit.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/modules/subversion/templates/hook_commit.sh b/modules/subversion/templates/hook_commit.sh
index 0fdfc3e5..22f31947 100644
--- a/modules/subversion/templates/hook_commit.sh
+++ b/modules/subversion/templates/hook_commit.sh
@@ -1,5 +1,20 @@
#!/bin/sh
-for script in $0.d/*; do
+
+REP="$1"
+TXN="$2"
+
+author=$(svnlook author -t "$TXN" "$REP")
+
+# This is here only the time we use hook_sendmail.pl
+# We will be able to remove it when updating to a better send mail hook
+
+if [ "$author" = 'schedbot' ]; then
+ LIST= `ls $0.d/* | grep -v hook_sendmail.pl `
+else
+ LIST=`ls $0.d/*`
+fi
+
+for script in $LIST; do
if [ ! -x "$script" ]; then
continue
fi