From bd2e59526e035373d4e44084e1b19cdfd2622d6d Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Fri, 16 Jan 2004 03:23:01 +0000 Subject: Updates to the CIA notification stuff for tag and files handling. BKrev: 40075915pmp-Cs4DIljPkLf9gy-XJA --- BitKeeper/triggers/ciabot_bk.sh | 79 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) (limited to 'BitKeeper/triggers/ciabot_bk.sh') diff --git a/BitKeeper/triggers/ciabot_bk.sh b/BitKeeper/triggers/ciabot_bk.sh index e69de29bb2..a75be349ae 100644 --- a/BitKeeper/triggers/ciabot_bk.sh +++ b/BitKeeper/triggers/ciabot_bk.sh @@ -0,0 +1,79 @@ +#!/bin/sh +# +# CIA bot client script for BitKeeper repositories, delivering via email +# -- Chris Larson +# +# Based on ciabot_svn.sh by Micah Dowty +# +# See http://cia.navi.cx +# for more information on what the CIA bot is and how it works. +# +############# There are some parameters for this script that you can customize: + +# Project information +project_name="openembedded" +return_address="oe@handhelds.org" + +# System +sendmail_command="/usr/sbin/sendmail -t" + +############# Below this line you shouldn't have to change anything + +# Script arguments +REV="$1" + +# The email address CIA lives at +cia_address="cia@navi.cx" + +author=`echo $BK_USER | sed 's/\&/\&/g;s//\>/g'` +module=`basename $BKD_ROOT | sed 's/\&/\&/g;s//\>/g'` +log=`bk changes -r"$REV" -d":C:" | sed 's/\&/\&/g;s//\>/g'` +tag=`bk changes -r"$REV" -d":TAG:" | sed 's/\&/\&/g;s//\>/g'` +files=`bk changes -n -v -r"$REV" -d"\\\$unless(:GFILE:=ChangeSet){:GFILE:}" | sort -u | sed 's/\&/\&/g;s//\>/g'` + +# Send an email with the final XML message +(cat < + + BitKeeper CIA Bot client shell script + 1.0 + + + $project_name + $module +EOF + +if test -n "$tag"; then + echo " $tag" +fi + +cat < + + + $REV + $author +EOF + +if test -n "$files"; then + echo " " + for f in $files; do + echo " $f" + done + echo " " +fi + +cat <$log + + + +EOF +) | tee ~/sendmailcmd.$$ | $sendmail_command + +### The End ### -- cgit v1.2.3