head     1.1;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.1
date     89.07.20.12.45.34;  author sarah;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#!/bin/sh
#
# vwbug	- submit a bug report to Wind River Systems
#
# modification history
# --------------------
# 01e,16sep88,od   Fix mail address to work locally as well as on customer
# 01d,12sep88,gae  documentation.
# 01c,21aug88,gae  documentation; integrated vwbugformat; changed from csh.
# 01b,05nov87,jlf  documentation update, mod history added
#
# SYNOPSIS
# vwbug
#
# DESCRIPTION
# Create a bug report and mail to `wrs!vwbug'.
# The user will be placed in `vi' with a copy of the bug report template.
# When complete, simply exit the editor, and the report will be
# mailed automatically.
#
# There must be a direct mail path to the wrs! computer for this to
# work.  A connection is available to VxWorks customers upon request.
# If there is an indirect connection, the vwbug script must be edited to
# mail the bug to the appropriate mail path.
#*/

if [ `domainname` = "swamp" ]; then
    wrsmail=vwbug@@wrs
else
    wrsmail=wrs!vwbug
fi
mailer=/usr/ucb/mail
ed=/usr/ucb/vi
tool=`basename $0`
vwbug=/tmp/$tool.$$
vwbugb=${vwbug}b
trap "rm -f $vwbug $vwbugb; exit" 0 1 2 3 15

sed -e "1,/^#VWBUG_FORMAT/d" < $0 > $vwbug
cp $vwbug $vwbugb
$ed $vwbug

# make sure file changed, if file is empty then (vi sometimes
# leaves 1 char behind) then assume user meant to cancel.
 
cmp -s $vwbug $vwbugb
 
if (test $? -eq 0 -o `cat $vwbug | wc -c` -le 1) then
    echo "$tool: cancelled"
else
    $mailer $wrsmail <$vwbug
    echo "$tool: sent"
fi

exit 0

#VWBUG_FORMAT
PRIMARY AFFECTED MODULE:


REPORTED BY:
     COMPANY:
     CONTACT:
     ADDRESS:
     PHONE:


DETAILED DESCRIPTION OF PROBLEM:


SYSTEM CONFIGURATION:
     CPU:
     VXWORKS REV:
     RAM:
     OTHER PERIPHERALS:


DEMONSTRATION PROGRAM / PROCEDURE:


PROPOSED SOLUTION:
@
