1#!/bin/sh - 2# 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# 7# @(#)sendbug.sh 5.3 (Berkeley) 85/08/09 8# 9# Create a bug report and mail to '4bsd-bugs'. 10# 11 12TEMP=/tmp/bug$$ 13FORMAT=/usr/ucb/bugformat 14 15: ${BUGADDR=4bsd-bugs@ucbarpa.BERKELEY.EDU} 16: ${EDITOR=/usr/ucb/vi} 17 18trap '/bin/rm -f $TEMP' 0 1 2 3 13 15 19 20/bin/cp $FORMAT $TEMP 21if $EDITOR $TEMP 22then 23 if cmp -s $FORMAT $TEMP 24 then 25 echo "File not changed, no bug report submitted." 26 exit 27 fi 28 case "$#" in 29 0) /usr/lib/sendmail -t -oi $BUGADDR < $TEMP ;; 30 *) /usr/lib/sendmail -t -oi "$@" < $TEMP ;; 31 esac 32fi 33