xref: /csrg-svn/libexec/bugfiler/sendbug.sh (revision 33416)
124237Skre#!/bin/sh -
212373Sralph#
322381Sdist# Copyright (c) 1983 Regents of the University of California.
4*33416Sbostic# All rights reserved.
522381Sdist#
6*33416Sbostic# Redistribution and use in source and binary forms are permitted
7*33416Sbostic# provided that this notice is preserved and that due credit is given
8*33416Sbostic# to the University of California at Berkeley. The name of the University
9*33416Sbostic# may not be used to endorse or promote products derived from this
10*33416Sbostic# software without specific prior written permission. This software
11*33416Sbostic# is provided ``as is'' without express or implied warranty.
1222381Sdist#
13*33416Sbostic#	@(#)sendbug.sh	5.7 (Berkeley) 02/01/88
14*33416Sbostic#
1512373Sralph# Create a bug report and mail to '4bsd-bugs'.
1612373Sralph
1724237SkreTEMP=/tmp/bug$$
1826160SbloomFORMAT=/usr/lib/bugformat
1916238Sralph
2024238Skre# uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path.
2124238Skre: ${BUGADDR=4bsd-bugs@BERKELEY.EDU}
2224237Skre: ${EDITOR=/usr/ucb/vi}
2324237Skre
2424632Ssergetrap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15
2524237Skre
2624237Skre/bin/cp $FORMAT $TEMP
2724237Skreif $EDITOR $TEMP
2824237Skrethen
2924237Skre	if cmp -s $FORMAT $TEMP
3024237Skre	then
3124237Skre		echo "File not changed, no bug report submitted."
3224237Skre		exit
3324237Skre	fi
3424237Skre	case "$#" in
3524237Skre	0) /usr/lib/sendmail -t -oi $BUGADDR  < $TEMP ;;
3624237Skre	*) /usr/lib/sendmail -t -oi "$@" < $TEMP ;;
3724237Skre	esac
3824237Skrefi
3924632Sserge
4024632Sserge/bin/rm -f $TEMP
41