xref: /csrg-svn/libexec/bugfiler/sendbug.sh (revision 33416)
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 this notice is preserved and that due credit is given
8# to the University of California at Berkeley. The name of the University
9# may not be used to endorse or promote products derived from this
10# software without specific prior written permission. This software
11# is provided ``as is'' without express or implied warranty.
12#
13#	@(#)sendbug.sh	5.7 (Berkeley) 02/01/88
14#
15# Create a bug report and mail to '4bsd-bugs'.
16
17TEMP=/tmp/bug$$
18FORMAT=/usr/lib/bugformat
19
20# uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path.
21: ${BUGADDR=4bsd-bugs@BERKELEY.EDU}
22: ${EDITOR=/usr/ucb/vi}
23
24trap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15
25
26/bin/cp $FORMAT $TEMP
27if $EDITOR $TEMP
28then
29	if cmp -s $FORMAT $TEMP
30	then
31		echo "File not changed, no bug report submitted."
32		exit
33	fi
34	case "$#" in
35	0) /usr/lib/sendmail -t -oi $BUGADDR  < $TEMP ;;
36	*) /usr/lib/sendmail -t -oi "$@" < $TEMP ;;
37	esac
38fi
39
40/bin/rm -f $TEMP
41