aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion/templates/hook_commit.sh
blob: 22f31947c9a66526107c636baf11fad696313ea4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

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

    if [[ "$script" == *~ ]]; then
        continue
    fi

    $script $@ || exit 1
done