notify.sh


Called by the Perforce trigger function to notify administrators when files under //depot/dev/*/*/install/weblogic have changed.


###
### notify.sh
###
### Email admins when files under ../weblogic/install have change
###
###
###

PATH=$PATH:/usr/local/bin

P4PORT=DevBox:1666
P4ROOT=/usr/p4
P4USER=username
P4PASSWD=password
P4JOURNAL=/usr/p4/journal

export PATH P4PORT P4ROOT P4USER P4PASSWD P4ROOT P4JOURNAL


change=$1
email=$2

echo "Sending notice of $change to $email"
p4 describe $change > /tmp/$change.tmp
p4 opened -ac $change >> /tmp/$change.tmp
mail -s "Change: $change" $email < /tmp/$change.tmp

exit 0


 

Home