#! /bin/sh # arch-tag: Matthieu Moy, Tue Mar 29 22:22:53 2005 (rev2mail.sh) # # while test $# -ne 0; do case "$1" in "--help"|"-h") cat << EOF Usage: $(basename $0) archive/c--b--v--r subject recipients Sends a mail to RECIPIENTS EOF exit 0 ;; *) break ;; esac done revision=$1 subject=$2 shift shift recipients="$@" logfile="`tempfile`" tla cat-archive-log "$revision" > "${logfile}" summary=$(grep "^Summary: " "${logfile}" | head -1 | sed 's/^Summary: //') mail -s "${subject} ${summary}" ${recipients} < "${logfile}" echo "Mail sent to ${recipients}:" echo " ${subject} ${summary}" rm "${logfile}"