Debian Codegraph @

bin/apsfilter-bug.in

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