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 | # |
435e8dff | 18 | # @(#)sendbug.sh 5.9 (Berkeley) %G% |
9725ee58 | 19 | # |
aec2eff2 | 20 | # Create a bug report and mail to '4bsd-bugs'. |
9725ee58 | 21 | |
435e8dff KB |
22 | PATH=/bin:/sbin:/usr/sbin:/usr/bin |
23 | export PATH | |
24 | ||
9725ee58 | 25 | TEMP=/tmp/bug$$ |
435e8dff | 26 | FORMAT=/usr/share/misc/bugformat |
9725ee58 | 27 | |
e70420db RE |
28 | # uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path. |
29 | : ${BUGADDR=4bsd-bugs@BERKELEY.EDU} | |
435e8dff | 30 | : ${EDITOR=vi} |
6dbbb852 | 31 | |
435e8dff | 32 | trap 'rm -f $TEMP ; exit 1' 1 2 3 13 15 |
055d98e6 | 33 | |
435e8dff | 34 | cp $FORMAT $TEMP |
9725ee58 RE |
35 | if $EDITOR $TEMP |
36 | then | |
37 | if cmp -s $FORMAT $TEMP | |
38 | then | |
39 | echo "File not changed, no bug report submitted." | |
40 | exit | |
41 | fi | |
42 | case "$#" in | |
435e8dff KB |
43 | 0) sendmail -t -oi $BUGADDR < $TEMP ;; |
44 | *) sendmail -t -oi "$@" < $TEMP ;; | |
9725ee58 RE |
45 | esac |
46 | fi | |
e1c2388a | 47 | |
435e8dff | 48 | rm -f $TEMP |