diff options
author | Chris Larson <clarson@kergoth.com> | 2004-09-23 17:22:17 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2004-09-23 17:22:17 +0000 |
commit | 808852853799ecb8d9e7fe37884a9222199a9919 (patch) | |
tree | 7b5940f6bb67d37e6eb61e4a319ce21eb7204c84 | |
parent | 1ecd547694bf177fa6e2f1735e0ce9000369e6e6 (diff) |
Attempt to make the triggers a bit smarter.
BKrev: 4153064992Y5nU0T9yK2OehUxnpo6Q
-rw-r--r-- | BitKeeper/triggers/ciabot.projects | 0 | ||||
-rw-r--r-- | BitKeeper/triggers/ciabot_bk.sh | 4 | ||||
-rw-r--r-- | BitKeeper/triggers/post-outgoing.ciabot | 24 |
3 files changed, 25 insertions, 3 deletions
diff --git a/BitKeeper/triggers/ciabot.projects b/BitKeeper/triggers/ciabot.projects new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/BitKeeper/triggers/ciabot.projects diff --git a/BitKeeper/triggers/ciabot_bk.sh b/BitKeeper/triggers/ciabot_bk.sh index aa61599bc5..b757b49238 100644 --- a/BitKeeper/triggers/ciabot_bk.sh +++ b/BitKeeper/triggers/ciabot_bk.sh @@ -11,8 +11,8 @@ ############# There are some parameters for this script that you can customize: # Project information -project_name="openembedded" -return_address="oe@handhelds.org" +[ -z "$project_name" ] && project_name="openembedded" +[ -z "$project_name" ] && return_address="oe@handhelds.org" # System sendmail_command="/usr/sbin/sendmail -t" diff --git a/BitKeeper/triggers/post-outgoing.ciabot b/BitKeeper/triggers/post-outgoing.ciabot index 25c2284832..3944b234c4 100644 --- a/BitKeeper/triggers/post-outgoing.ciabot +++ b/BitKeeper/triggers/post-outgoing.ciabot @@ -1,5 +1,8 @@ #!/bin/sh - +# +# ex:ts=4:sw=4:sts=4:et +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- +# # Copyright (C) 2004 Chris Larson <kergoth@handhelds.org> # # Sanity checks taken from the scripts on commits.bkbits.net @@ -39,9 +42,28 @@ check_sanity () { fi } +check_projects () { + if [ ! -e ciabot.projects ]; then + return 1 + fi + + while read _p _s _e; do + _sshort=`echo $_s|sed -e's,.bkbits.net,,'` + if (echo $BKD_ROOT|grep "/${_sshort}"); then + project_name=${_p} + return_address=${_e} + fi + done < ciabot.projects + export project_name return_address + return 0 +} + # Check sanity - do we need to send anything? check_sanity || exit 0 +# Check projects - attempt to determine which bkbits project we are +check_projects || exit 0 + if (grep -q 'ChangeSet' $BK_CSETLIST); then # new, correct csets-out format nums=`bk changes -d":REV: " - < $BK_CSETLIST` |