xref: /csrg-svn/libexec/bugfiler/sendbug.sh (revision 34910)
1#!/bin/sh -
2#
3# Copyright (c) 1983 Regents of the University of California.
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms are permitted
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.
17#
18#	@(#)sendbug.sh	5.8 (Berkeley) 06/29/88
19#
20# Create a bug report and mail to '4bsd-bugs'.
21
22TEMP=/tmp/bug$$
23FORMAT=/usr/lib/bugformat
24
25# uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path.
26: ${BUGADDR=4bsd-bugs@BERKELEY.EDU}
27: ${EDITOR=/usr/ucb/vi}
28
29trap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15
30
31/bin/cp $FORMAT $TEMP
32if $EDITOR $TEMP
33then
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
43fi
44
45/bin/rm -f $TEMP
46