1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
#! @shell@
# -*- sh -*-
#
# $ApsCVS: src/apsfilter/bin/apsfilter-bug.in,v 1.1.2.1 2001/12/29 16:03:09 andreas Exp $
#
# apsfilter-bug -- create a bug report and mail it to the bug address.
#
# create bug report template
TEMP=`mktemp -q /tmp/apsbug.XXXXXX 2>/dev/null`
if [ $? -ne 0 ]; then
TEMP=/tmp/apsbug.$$
echo > $TEMP
chmod 600 $TEMP
fi
TEMP2=`mktemp -q /tmp/apsbug.XXXXXX 2>/dev/null`
if [ $? -ne 0 ]; then
TEMP2=/tmp/apsbug.$$
echo > $TEMP2
chmod 600 $TEMP2
fi
trap 'rm -f $TEMP $TEMP2; exit 1' 1 2 3 13 15
trap 'rm -f $TEMP $TEMP2' 0
: ${EDITOR:=emacs}
cat > $TEMP <<EOF
#
# -= automatic apsfilter bug report =-
#
# Please add any information that might help us resolve the bug.
# Lines starting with '#' will be removed automatically.
#
#
# make this a valid e-mail address
From: $USER@$HOSTNAME
#
# don't change this unless you _absolutely_ know better
To: apsfilter-@branch@@apsfilter.org
#
# add a short description of the problem here
Subject: apsfilter bug:
#
# when did the error occur?
# (one of: configure, install, setup, usage, other, unknown)
>Error type:
#
# how can others repeat that error?
>How to repeat:
#
# VERY IMPORTANT:
# please read the handbook and/or manpage about using "aps2file -D ..."
# to create an error log, then insert that stuff here
# (does not apply to configure, install or setup errors)
>Error log:
#
# which settings in (global or local) apsfilterrc did you change?
>apsfilterrc changes:
#
# did you receive any error mails from apsfilter, and if so, which ones?
>Error mails:
#
# what did you expect to happen?
>Expected:
#
# if you already have a fix, please give us a description and/or
# a patch here (doesn't have to be elegant, just functional)
>Fix:
#
# any additional comment you'd like to add
>Comment:
#
# Thanks for your bug report!
#
# Now save the file (under its original name) and exit from your editor.
# If you don't want to submit this report, just exit without saving.
#
EOF
chmod u+w $TEMP2
cp $TEMP $TEMP2
eval $EDITOR $TEMP
if cmp -s $TEMP $TEMP2 ; then
echo "File not changed, no bug report submitted."
exit 1
fi
{
# remove comment lines and add relevant details
grep -v "^#" $TEMP
gs_version=$(gs --version)
system_id=$(uname -a)
cat <<EOF
-------------------------------------------------
additional information (automatically generated):
apsfilter version: @VERSION@-@branch@
ghostscript version: $gs_version
system identification: $system_id
configure options: @confopts@
shell: @shell@
awk: @awk@
sendmail: @sendmail@
EOF
} > $TEMP2
if "@sendmail@" -oem -t < $TEMP2; then
echo "apsfilter bug report has been sent"
exit 0
else
echo "unknown sendmail failure, bug report not sent"
exit 1
fi
|