Mercurial > hg > octave-lyh
changeset 964:9c2b69170142
[project @ 1994-12-09 19:32:01 by jwe]
author | jwe |
---|---|
date | Fri, 09 Dec 1994 19:32:01 +0000 |
parents | 28f5711477b3 |
children | 141d2abb71de |
files | octave-bug.in |
diffstat | 1 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/octave-bug.in +++ b/octave-bug.in @@ -146,16 +146,20 @@ else # Try to extract the recipient address, in case the To: line in the -# message template has been changed. +# message template has been changed. Also get cc: lines. - TMP_BUGADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^To://p'` - if test -z "$TMP_BUGADDR" + TO_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Tt][Oo]://p'` + CC_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Cc][Cc]://p'` + + if test -z "$TO_ADDR" then echo "no valid \`To:' field found in header -- using $BUGADDR instead" else - BUGADDR="$TMP_BUGADDR" + BUGADDR="$TO_ADDR" fi + BUGADDR="$BUGADDR $CC_ADDR" + # Delete the `--------' separator in the message. awk 'BEGIN{ in_header = 1; } \ @@ -167,15 +171,15 @@ } } { print $0; - }' $TEMP > $TEMP.msg + }' $TEMP > $TEMP.x # Now try to mail it. - ( rmail $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ - ( mailx -s "$SUBJECT" $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ - ( Mail -s "$SUBJECT" $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ - ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ - ( /bin/mail $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ + ( rmail $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ + ( mailx -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ + ( Mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ + ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ + ( /bin/mail $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ ( echo "unable to send mail -- saving message in \$HOME/dead.octave-bug"; \ cat $TEMP >> $HOME/dead.octave-bug; exit 1 ) @@ -183,8 +187,9 @@ if test $status -eq 0 then - echo "bug report sent to $BUGADDR" - fi + echo "bug report sent to: $TO_ADDR" + echo " cc to: $CC_ADDR" + fi fi else echo "problems with edit -- no bug report submitted"