aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion/templates/hook_commit.sh
blob: 2b1b6ff3a0f15024aa6a5e41478e36668d4f0ced (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
#!/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 -1 $0.d/* | grep -v send_mail`
else
  LIST=`ls -1 $0.d/*`
fi
 
for script in $LIST; do
    if [ ! -x "$script" ]; then
        continue
    fi

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

    $script $@ || exit 1
done