Commit | Line | Data |
---|---|---|
9725ee58 | 1 | #!/bin/sh - |
6dbbb852 | 2 | # |
7172eb74 DF |
3 | # Copyright (c) 1983 Regents of the University of California. |
4 | # All rights reserved. The Berkeley software License Agreement | |
5 | # specifies the terms and conditions for redistribution. | |
6 | # | |
c71fd59b | 7 | # @(#)sendbug.sh 5.6 (Berkeley) 86/02/12 |
6dbbb852 | 8 | # |
7172eb74 | 9 | # Create a bug report and mail to '4bsd-bugs'. |
9725ee58 RE |
10 | # |
11 | ||
12 | TEMP=/tmp/bug$$ | |
c71fd59b | 13 | FORMAT=/usr/lib/bugformat |
9725ee58 | 14 | |
e70420db RE |
15 | # uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path. |
16 | : ${BUGADDR=4bsd-bugs@BERKELEY.EDU} | |
9725ee58 | 17 | : ${EDITOR=/usr/ucb/vi} |
6dbbb852 | 18 | |
e1c2388a | 19 | trap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15 |
055d98e6 | 20 | |
9725ee58 RE |
21 | /bin/cp $FORMAT $TEMP |
22 | if $EDITOR $TEMP | |
23 | then | |
24 | if cmp -s $FORMAT $TEMP | |
25 | then | |
26 | echo "File not changed, no bug report submitted." | |
27 | exit | |
28 | fi | |
29 | case "$#" in | |
30 | 0) /usr/lib/sendmail -t -oi $BUGADDR < $TEMP ;; | |
31 | *) /usr/lib/sendmail -t -oi "$@" < $TEMP ;; | |
32 | esac | |
33 | fi | |
e1c2388a S |
34 | |
35 | /bin/rm -f $TEMP |