Mercurial > octave
comparison octave-bug.in @ 964:9c2b69170142
[project @ 1994-12-09 19:32:01 by jwe]
author | jwe |
---|---|
date | Fri, 09 Dec 1994 19:32:01 +0000 |
parents | ceec002516c7 |
children | 32ff7b6638a0 |
comparison
equal
deleted
inserted
replaced
963:28f5711477b3 | 964:9c2b69170142 |
---|---|
144 echo "file not changed -- no bug report submitted" | 144 echo "file not changed -- no bug report submitted" |
145 status=1 | 145 status=1 |
146 else | 146 else |
147 | 147 |
148 # Try to extract the recipient address, in case the To: line in the | 148 # Try to extract the recipient address, in case the To: line in the |
149 # message template has been changed. | 149 # message template has been changed. Also get cc: lines. |
150 | 150 |
151 TMP_BUGADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^To://p'` | 151 TO_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Tt][Oo]://p'` |
152 if test -z "$TMP_BUGADDR" | 152 CC_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Cc][Cc]://p'` |
153 | |
154 if test -z "$TO_ADDR" | |
153 then | 155 then |
154 echo "no valid \`To:' field found in header -- using $BUGADDR instead" | 156 echo "no valid \`To:' field found in header -- using $BUGADDR instead" |
155 else | 157 else |
156 BUGADDR="$TMP_BUGADDR" | 158 BUGADDR="$TO_ADDR" |
157 fi | 159 fi |
160 | |
161 BUGADDR="$BUGADDR $CC_ADDR" | |
158 | 162 |
159 # Delete the `--------' separator in the message. | 163 # Delete the `--------' separator in the message. |
160 | 164 |
161 awk 'BEGIN{ in_header = 1; } \ | 165 awk 'BEGIN{ in_header = 1; } \ |
162 /^--------[ \t]*$/ { | 166 /^--------[ \t]*$/ { |
165 print ""; | 169 print ""; |
166 next; | 170 next; |
167 } | 171 } |
168 } { | 172 } { |
169 print $0; | 173 print $0; |
170 }' $TEMP > $TEMP.msg | 174 }' $TEMP > $TEMP.x |
171 | 175 |
172 # Now try to mail it. | 176 # Now try to mail it. |
173 | 177 |
174 ( rmail $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ | 178 ( rmail $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ |
175 ( mailx -s "$SUBJECT" $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ | 179 ( mailx -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ |
176 ( Mail -s "$SUBJECT" $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ | 180 ( Mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ |
177 ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ | 181 ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ |
178 ( /bin/mail $BUGADDR < $TEMP ) > /dev/null 2>&1 || \ | 182 ( /bin/mail $BUGADDR < $TEMP.x ) > /dev/null 2>&1 || \ |
179 ( echo "unable to send mail -- saving message in \$HOME/dead.octave-bug"; \ | 183 ( echo "unable to send mail -- saving message in \$HOME/dead.octave-bug"; \ |
180 cat $TEMP >> $HOME/dead.octave-bug; exit 1 ) | 184 cat $TEMP >> $HOME/dead.octave-bug; exit 1 ) |
181 | 185 |
182 status=$? | 186 status=$? |
183 | 187 |
184 if test $status -eq 0 | 188 if test $status -eq 0 |
185 then | 189 then |
186 echo "bug report sent to $BUGADDR" | 190 echo "bug report sent to: $TO_ADDR" |
187 fi | 191 echo " cc to: $CC_ADDR" |
192 fi | |
188 fi | 193 fi |
189 else | 194 else |
190 echo "problems with edit -- no bug report submitted" | 195 echo "problems with edit -- no bug report submitted" |
191 status=1 | 196 status=1 |
192 fi | 197 fi |