From: Gary V. Vaughan Date: Wed, 11 Feb 2004 12:51:02 +0000 (+0000) Subject: * commit: Mail a nicer commit notification. X-Git-Tag: release-1-9b~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=029599241ad053780c2c21c74cdaab313eed2ab0;p=thirdparty%2Flibtool.git * commit: Mail a nicer commit notification. --- diff --git a/ChangeLog b/ChangeLog index 3979ed3f7..4d75b6837 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-02-11 Gary V. Vaughan + + * commit: Mail a nicer commit notification. + 2004-02-10 Gary V. Vaughan * NEWS, bootstrap, configure.ac, ltmain.in, m4/libtool.m4: diff --git a/commit b/commit index 691ede1c3..acc4f1e38 100755 --- a/commit +++ b/commit @@ -93,8 +93,8 @@ my_sed_version='/^# '$name' (GNU /,/# warranty; / { p; }; d' -rm -f "$log_file" -trap 'rm -f "$log_file"; exit 1' 1 2 15 +rm -f "${log_file}*" +trap 'rm -f "${log_file}*"; exit 1' 1 2 15 set -e @@ -374,17 +374,35 @@ done # Send a copy of the log_file if sendmail_to was set: if test -n "$sendmail_to"; then + notify_file="${log_file}.2" echo "$name: Mailing commit notification to $sendmail_to" >&2 test $# -gt 0 && filelist="$@" - test -f "$signature_file" && cat "$signature_file" >> "$log_file" + + { + test -f CVS/Root && + echo "CVSROOT: `sed -e 's,.*:,,g' CVS/Root`" + test -f ./mkstamp && + echo "TIMESTAMP: `$SHELL ./mkstamp < ./ChangeLog`" + test -f CVS/Repository && + echo "Module name: `cat CVS/Repository`" + test -f CVS/Tag && + echo "Branch: `sed -e 's,^T,,;1q' CVS/Tag`" + test -f CVS/Root && + echo "Changes by: `sed -e 's,^.*:\(.*\):.*$,\1,' CVS/Root`" + echo "" + echo "Log Message:" + sed -e 's,^, ,' "$log_file" + test -f "$signature_file" && cat "$signature_file" + } >> "$notify_file" + if test -n "$sendmail_from"; then - $SHELL $MAILNOTIFY -F "$sendmail_from" -s "`echo $filelist`" -f "$log_file" -m "text/plain" "$sendmail_to" + $SHELL $MAILNOTIFY -F "$sendmail_from" -s "`echo $filelist`" -f "$notify_file" -m "text/plain" "$sendmail_to" else - $SHELL $MAILNOTIFY -s "`echo $filelist`" -f "$log_file" -m "text/plain" "$sendmail_to" + $SHELL $MAILNOTIFY -s "`echo $filelist`" -f "$notify_file" -m "text/plain" "$sendmail_to" fi fi -rm -f "$log_file" +rm -f "${log_file}*" # if main_repeat was not set to `false', we failed $main_repeat && exit 1