xref: /csrg-svn/libexec/bugfiler/sendbug.sh (revision 24632)
124237Skre#!/bin/sh -
212373Sralph#
322381Sdist# Copyright (c) 1983 Regents of the University of California.
422381Sdist# All rights reserved.  The Berkeley software License Agreement
522381Sdist# specifies the terms and conditions for redistribution.
622381Sdist#
7*24632Sserge#	@(#)sendbug.sh	5.5 (Berkeley) 85/09/07
822381Sdist#
912373Sralph# Create a bug report and mail to '4bsd-bugs'.
1024237Skre#
1112373Sralph
1224237SkreTEMP=/tmp/bug$$
1324237SkreFORMAT=/usr/ucb/bugformat
1416238Sralph
1524238Skre# uucp sites should use ": ${BUGADDR=ucbvax!4bsd-bugs}" with a suitable path.
1624238Skre: ${BUGADDR=4bsd-bugs@BERKELEY.EDU}
1724237Skre: ${EDITOR=/usr/ucb/vi}
1824237Skre
19*24632Ssergetrap '/bin/rm -f $TEMP ; exit 1' 1 2 3 13 15
2024237Skre
2124237Skre/bin/cp $FORMAT $TEMP
2224237Skreif $EDITOR $TEMP
2324237Skrethen
2424237Skre	if cmp -s $FORMAT $TEMP
2524237Skre	then
2624237Skre		echo "File not changed, no bug report submitted."
2724237Skre		exit
2824237Skre	fi
2924237Skre	case "$#" in
3024237Skre	0) /usr/lib/sendmail -t -oi $BUGADDR  < $TEMP ;;
3124237Skre	*) /usr/lib/sendmail -t -oi "$@" < $TEMP ;;
3224237Skre	esac
3324237Skrefi
34*24632Sserge
35*24632Sserge/bin/rm -f $TEMP
36