Commit | Line | Data |
---|---|---|
9725ee58 | 1 | #!/bin/sh - |
6dbbb852 | 2 | # |
7172eb74 | 3 | # Copyright (c) 1983 Regents of the University of California. |
aec2eff2 | 4 | # All rights reserved. |
7172eb74 | 5 | # |
aec2eff2 | 6 | # Redistribution and use in source and binary forms are permitted |
5e8b0e60 KB |
7 | # provided that the above copyright notice and this paragraph are |
8 | # duplicated in all such forms and that any documentation, | |
9 | # advertising materials, and other materials related to such | |
10 | # distribution and use acknowledge that the software was developed | |
11 | # by the University of California, Berkeley. The name of the | |
12 | # University may not be used to endorse or promote products derived | |
13 | # from this software without specific prior written permission. | |
14 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
15 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
16 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
6dbbb852 | 17 | # |
5e8b0e60 | 18 | # @(#)sendbug.sh 5.8 (Berkeley) %G% |
9725ee58 | 19 | # |
aec2eff2 | 20 | # Create a bug report and mail to '4bsd-bugs'. |
9725ee58 RE |
21 | |
22 | TEMP=/tmp/bug$$ | |
c71fd59b | 23 | FORMAT=/usr/lib/bugformat |
9725ee58 | 24 | |
e70420db RE |
25 | # uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path. |
26 | : ${BUGADDR=4bsd-bugs@BERKELEY.EDU} | |
9725ee58 | 27 | : ${EDITOR=/usr/ucb/vi} |
6dbbb852 | 28 | |
e1c2388a | 29 | trap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15 |
055d98e6 | 30 | |
9725ee58 RE |
31 | /bin/cp $FORMAT $TEMP |
32 | if $EDITOR $TEMP | |
33 | then | |
34 | if cmp -s $FORMAT $TEMP | |
35 | then | |
36 | echo "File not changed, no bug report submitted." | |
37 | exit | |
38 | fi | |
39 | case "$#" in | |
40 | 0) /usr/lib/sendmail -t -oi $BUGADDR < $TEMP ;; | |
41 | *) /usr/lib/sendmail -t -oi "$@" < $TEMP ;; | |
42 | esac | |
43 | fi | |
e1c2388a S |
44 | |
45 | /bin/rm -f $TEMP |