Mercurial > hg > octave-lyh
comparison octave-bug.in @ 2222:a2e240d3f336
[project @ 1996-05-17 08:00:55 by jwe]
author | jwe |
---|---|
date | Fri, 17 May 1996 08:02:36 +0000 |
parents | aa04b4b4f285 |
children | eda6da293342 |
comparison
equal
deleted
inserted
replaced
2221:b9b575b75d81 | 2222:a2e240d3f336 |
---|---|
62 | 62 |
63 trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15 | 63 trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15 |
64 trap 'rm -f $TEMP $TEMP.x' 0 | 64 trap 'rm -f $TEMP $TEMP.x' 0 |
65 | 65 |
66 UN= | 66 UN= |
67 if (uname) > /dev/null 2>&1 | 67 if (uname) > /dev/null 2>&1; then |
68 then | |
69 UN=`uname -a` | 68 UN=`uname -a` |
70 fi | 69 fi |
71 | 70 |
72 HAVE_FMT=false | 71 HAVE_FMT=false |
73 if (fmt < /dev/null) > /dev/null 2>&1 | 72 if (fmt < /dev/null) > /dev/null 2>&1; then |
74 then | |
75 HAVE_FMT=true | 73 HAVE_FMT=true |
76 fi | 74 fi |
77 | 75 |
78 ss_p=`echo $VERSION | grep "^ss-"` | 76 ss_p=`echo $VERSION | grep "^ss-"` |
79 if test -n "$ss_p" | 77 if test -n "$ss_p"; then |
80 then | |
81 BUGADDR="octave-maintainers@bevo.che.wisc.edu" | 78 BUGADDR="octave-maintainers@bevo.che.wisc.edu" |
82 else | 79 else |
83 BUGADDR="bug-octave@bevo.che.wisc.edu" | 80 pretest_p=`echo $VERSION \ |
81 | sed 's,.*[0-9]*\.[0-9]*\.\([0-9]*\).*,\1,' \ | |
82 | grep -v '\.'` | |
83 | |
84 if test -n "$pretest_p" && test "$pretest_p" -ge 90; then | |
85 BUGADDR="octave-maintainers@bevo.che.wisc.edu" | |
86 else | |
87 BUGADDR="bug-octave@bevo.che.wisc.edu" | |
88 fi | |
84 fi | 89 fi |
85 | 90 |
86 SUBJECT="[50 character or so descriptive subject here (for reference)]" | 91 SUBJECT="[50 character or so descriptive subject here (for reference)]" |
87 if test $# -gt 0 | 92 if test $# -gt 0; then |
88 then | |
89 case "$1" in | 93 case "$1" in |
90 -s) | 94 -s) |
91 shift | 95 shift |
92 if test $# -gt 0 | 96 if test $# -gt 0; then |
93 then | |
94 SUBJECT="$1" | 97 SUBJECT="$1" |
95 shift | 98 shift |
96 else | 99 else |
97 echo "usage: octave-bug [-s subject]" | 100 echo "usage: octave-bug [-s subject]" |
98 exit 1 | 101 exit 1 |
157 LIBDLFCN: $LIBDLFCN | 160 LIBDLFCN: $LIBDLFCN |
158 DEFS: | 161 DEFS: |
159 | 162 |
160 EOF | 163 EOF |
161 | 164 |
162 if $HAVE_FMT | 165 if $HAVE_FMT; then |
163 then | |
164 echo $DEFS | fmt | sed 's/^/ /' >> $TEMP | 166 echo $DEFS | fmt | sed 's/^/ /' >> $TEMP |
165 else | 167 else |
166 echo $DEFS >> $TEMP | 168 echo $DEFS >> $TEMP |
167 fi | 169 fi |
168 | 170 |
169 if test $# -gt 0 | 171 if test $# -gt 0; then |
170 then | 172 if test -f "$1"; then |
171 if test -f "$1" | |
172 then | |
173 cat >> $TEMP << EOF | 173 cat >> $TEMP << EOF |
174 | 174 |
175 User-preferences (please do not edit this section): | 175 User-preferences (please do not edit this section): |
176 -------------------------------------------------- | 176 -------------------------------------------------- |
177 | 177 |
183 chmod u+w $TEMP | 183 chmod u+w $TEMP |
184 cp $TEMP $TEMP.x | 184 cp $TEMP $TEMP.x |
185 | 185 |
186 status=0 | 186 status=0 |
187 | 187 |
188 if $EDITOR $TEMP | 188 if $EDITOR $TEMP; then |
189 then | 189 if cmp -s $TEMP $TEMP.x; then |
190 if cmp -s $TEMP $TEMP.x | |
191 then | |
192 echo "file not changed -- no bug report submitted" | 190 echo "file not changed -- no bug report submitted" |
193 status=1 | 191 status=1 |
194 elif test `wc $TEMP | awk '{print $1}'` -eq 0; then | 192 elif test `wc $TEMP | awk '{print $1}'` -eq 0; then |
195 echo "empty bug report file -- not submitted" | 193 echo "empty bug report file -- not submitted" |
196 status=1 | 194 status=1 |
200 # message template has been changed. Also get cc: lines. | 198 # message template has been changed. Also get cc: lines. |
201 | 199 |
202 TO_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Tt][Oo]://p'` | 200 TO_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Tt][Oo]://p'` |
203 CC_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Cc][Cc]://p'` | 201 CC_ADDR=`sed -e '/^--------[ \t]*$/q' $TEMP | sed -n -e 's/^[Cc][Cc]://p'` |
204 | 202 |
205 if test -z "$TO_ADDR" | 203 if test -z "$TO_ADDR"; then |
206 then | |
207 echo "no valid \`To:' field found in header -- using $BUGADDR instead" | 204 echo "no valid \`To:' field found in header -- using $BUGADDR instead" |
208 else | 205 else |
209 BUGADDR="$TO_ADDR" | 206 BUGADDR="$TO_ADDR" |
210 fi | 207 fi |
211 | 208 |