#!/bin/sh
#
#-----------------------------------------------------------------------
#  Script Name:		mail_new_brtype.sh Clearcase trigger script for new branch types
#
#  Function:		This script will mail the clearcase admin/configmgr when
#			a new branch type is created.
#
#  Author:		Lantrix (techdebug.com)
#
#  Creation Date:	18/09/2007
#
#  Version:		1.00
#
#  Input Variables:	$CLEARCASE_BRTYPE
#			$CLEARCASE_USER
#			$CLEARCASE_COMMENT
#
#  Output Files:	N/A
#
#  Error Messages/Error Codes:
#			N/A
#
#-----------------------------------------------------------------------

# Comma delimited email list of mail recipients
adminmail="youraddress@your.domain.com"
#This gets the host name
host=`uname -a |awk '{print $2}'`

#Begin send of message
echo "\
Creation of brtype \"$CLEARCASE_BRTYPE\"
by: $CLEARCASE_USER
comment:
$CLEARCASE_COMMENT" \
| /usr/bin/mailx -s "[$host:CLEARCASE] New branchtype $CLEARCASE_BRTYPE created" $adminmail
