annotate octave-bug.in @ 12121:87237a866c71 release-3-2-x

this branch is no longer maintained and is closed for further development
author John W. Eaton <jwe@octave.org>
date Sat, 22 Jan 2011 01:00:54 -0500
parents 16f53d29049f
children 592a959b68e5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
1 #! /bin/sh -
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
2 #
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2004,
9245
16f53d29049f update copyright notices
John W. Eaton <jwe@octave.org>
parents: 9187
diff changeset
4 # 2005, 2006, 2009 John W. Eaton
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
5 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
6 # This file is part of Octave.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
7 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
8 # Octave is free software; you can redistribute it and/or modify it
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
9 # under the terms of the GNU General Public License as published by the
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
10 # Free Software Foundation; either version 3 of the License, or (at
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
11 # your option) any later version.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
12 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
13 # Octave is distributed in the hope that it will be useful, but WITHOUT
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
16 # for more details.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
17 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
18 # You should have received a copy of the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
19 # along with Octave; see the file COPYING. If not, see
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
20 # <http://www.gnu.org/licenses/>.
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
21
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
22 # octave-bug - create a bug report and mail it to the bug-octave
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
23 # mailing list.
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
24 #
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
25 # Patterned after the bashbug script from bash 1.14.
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
26
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
27 # Configuration: these variables are filled in when running make to
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
28 # compile Octave.
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
29
3681
df54d394acc0 [project @ 2000-06-26 17:46:58 by jwe]
jwe
parents: 3590
diff changeset
30 config_opts=%OCTAVE_CONF_config_opts%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
31 VERSION=%OCTAVE_CONF_VERSION%
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
32 SED=%OCTAVE_CONF_SED%
3768
243148f6c91c [project @ 2001-01-29 18:05:34 by jwe]
jwe
parents: 3681
diff changeset
33 MACHINE=%OCTAVE_CONF_CANONICAL_HOST_TYPE%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
34 F77=%OCTAVE_CONF_F77%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
35 FFLAGS=%OCTAVE_CONF_FFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
36 FPICFLAG=%OCTAVE_CONF_FPICFLAG%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
37 FLIBS=%OCTAVE_CONF_FLIBS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
38 CPPFLAGS=%OCTAVE_CONF_CPPFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
39 INCFLAGS=%OCTAVE_CONF_INCFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
40 CC=%OCTAVE_CONF_CC%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
41 CC_VERSION=%OCTAVE_CONF_CC_VERSION%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
42 CFLAGS=%OCTAVE_CONF_CFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
43 CPICFLAG=%OCTAVE_CONF_CPICFLAG%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
44 CXX=%OCTAVE_CONF_CXX%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
45 CXX_VERSION=%OCTAVE_CONF_CXX_VERSION%
3681
df54d394acc0 [project @ 2000-06-26 17:46:58 by jwe]
jwe
parents: 3590
diff changeset
46 CXXFLAGS=%OCTAVE_CONF_CXXFLAGS%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
47 CXXPICFLAG=%OCTAVE_CONF_CXXPICFLAG%
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
48 LD_CXX=%OCTAVE_CONF_LD_CXX%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
49 LDFLAGS=%OCTAVE_CONF_LDFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
50 LIBFLAGS=%OCTAVE_CONF_LIBFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
51 RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
52 LIBS=%OCTAVE_CONF_LIBS%
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
53 BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS%
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
54 FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
55 LEXLIB=%OCTAVE_CONF_LEXLIB%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
56 LIBGLOB=%OCTAVE_CONF_LIBGLOB%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
57 DEFS=%OCTAVE_CONF_DEFS%
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
58
3082
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
59 : ${USER=$LOGNAME}
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
60
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
61 CC_AND_VERSION=
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
62 if test -n "$CC_VERSION"; then
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
63 CC_AND_VERSION="$CC, version $CC_VERSION"
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
64 fi
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
65
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
66 CXX_AND_VERSION=
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
67 if test -n "$CXX_VERSION"; then
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
68 CXX_AND_VERSION="$CXX, version $CXX_VERSION"
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
69 fi
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
70
846
8d85d95c43e6 [project @ 1994-10-20 21:15:00 by jwe]
jwe
parents: 801
diff changeset
71 PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:$PATH
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
72 export PATH
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
73
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
74 TEMP=/tmp/octave-bug.$$
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
75
5111
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
76 if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
77 if [ -x /usr/bin/editor ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
78 DEFEDITOR=editor
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
79 elif [ -x /usr/local/bin/ce ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
80 DEFEDITOR=ce
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
81 elif [ -x /usr/local/bin/emacs ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
82 DEFEDITOR=emacs
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
83 elif [ -x /usr/contrib/bin/emacs ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
84 DEFEDITOR=emacs
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
85 elif [ -x /usr/bin/emacs ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
86 DEFEDITOR=emacs
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
87 elif [ -x /usr/bin/xemacs ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
88 DEFEDITOR=xemacs
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
89 elif [ -x /usr/contrib/bin/jove ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
90 DEFEDITOR=jove
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
91 elif [ -x /usr/local/bin/jove ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
92 DEFEDITOR=jove
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
93 elif [ -x /usr/bin/vi ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
94 DEFEDITOR=vi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
95 else
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
96 echo "octave-bug: No default editor found: attempting to use vi" >&2
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
97 DEFEDITOR=vi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
98 fi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
99 fi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
100
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
101 : ${EDITOR=$DEFEDITOR}
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
102
5229
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
103 if [ -z "$DEFPAGER" ] && [ -z "$PAGER" ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
104 if [ -x /usr/bin/pager ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
105 DEFPAGER=pager
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
106 elif [ -x /usr/bin/less ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
107 DEFPAGER=less
5230
9ecae85335fa [project @ 2005-03-22 02:57:32 by jwe]
jwe
parents: 5229
diff changeset
108 elif [ -x /bin/less ]; then
5229
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
109 DEFPAGER=less
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
110 elif [ -x /usr/local/bin/less ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
111 DEFPAGER=less
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
112 elif [ -x /usr/bin/more ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
113 DEFPAGER=more
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
114 elif [ -x /bin/more ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
115 DEFPAGER=more
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
116 elif [ -x /usr/bin/pg ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
117 DEFPAGER=pg
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
118 elif [ -x /bin/pg ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
119 DEFPAGER=pg
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
120 else
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
121 echo "octave-bug: No default pager found: attempting to use more" >&2
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
122 DEFPAGER=more
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
123 fi
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
124 fi
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
125
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
126 : ${PAGER=$DEFPAGER}
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
127
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
128 trap 'rm -f $TEMP $TEMP.x; exit 1' 1 2 3 13 15
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
129 trap 'rm -f $TEMP $TEMP.x' 0
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
130
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
131 UN=
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
132 if (uname) > /dev/null 2>&1; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
133 UN=`uname -a`
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
134 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
135
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
136 HAVE_FMT=false
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
137 if (fmt < /dev/null) > /dev/null 2>&1; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
138 HAVE_FMT=true
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
139 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
140
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
141 # Check whether to use -n or \c to keep echo from printing a newline
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
142 # character. Stolen from autoconf, which borrowed the idea from dist 3.0.
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
143
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
144 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
145 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
146 if (echo -n testing; echo 1,2,3) | $SED s/-n/xn/ | grep xn >/dev/null; then
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
147 echo_n=
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
148 echo_c='
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
149 '
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
150 else
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
151 echo_n=-n
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
152 echo_c=
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
153 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
154 else
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
155 echo_n=
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
156 echo_c='\c'
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
157 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
158
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
159 ss_p=`echo $VERSION | grep "^ss-"`
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
160 if test -n "$ss_p"; then
5041
b2ce28713791 [project @ 2004-10-01 18:12:10 by jwe]
jwe
parents: 4084
diff changeset
161 BUGADDR="maintainers@octave.org"
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
162 else
2691
3dda19091c08 [project @ 1997-02-18 09:40:56 by jwe]
jwe
parents: 2676
diff changeset
163 pretest_p=`echo $VERSION \
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
164 | $SED 's,.*\.\([0-9]*\).*,\1,' \
2691
3dda19091c08 [project @ 1997-02-18 09:40:56 by jwe]
jwe
parents: 2676
diff changeset
165 | grep -v '\.' \
3dda19091c08 [project @ 1997-02-18 09:40:56 by jwe]
jwe
parents: 2676
diff changeset
166 | grep '[0-9]'`
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
167
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
168 if test -n "$pretest_p" && test "$pretest_p" -ge 90; then
5041
b2ce28713791 [project @ 2004-10-01 18:12:10 by jwe]
jwe
parents: 4084
diff changeset
169 BUGADDR="maintainers@octave.org"
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
170 else
5041
b2ce28713791 [project @ 2004-10-01 18:12:10 by jwe]
jwe
parents: 4084
diff changeset
171 BUGADDR="bug@octave.org"
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
172 fi
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
173 fi
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
174
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
175 SUBJECT="[50 character or so descriptive subject here (for reference)]"
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
176 if test $# -gt 0; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
177 case "$1" in
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
178 -s)
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
179 shift
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
180 if test $# -gt 0; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
181 SUBJECT="$1"
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
182 shift
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
183 else
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
184 echo "usage: octave-bug [-s subject]"
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
185 exit 1
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
186 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
187 ;;
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
188 esac
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
189 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
190
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
191 cat > $TEMP << EOF
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
192 To: $BUGADDR
3082
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
193 EOF
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
194 if test -n "$USER"; then
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
195 cat >> $TEMP << EOF
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
196 Cc: $USER
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
197 EOF
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
198 fi
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
199 cat >> $TEMP << EOF
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
200 Subject: $SUBJECT
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
201 --------
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
202 Bug report for Octave $VERSION configured for $MACHINE
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
203
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
204 Description:
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
205 -----------
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
206
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
207 * Please replace this item with a detailed description of the
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
208 problem. Suggestions or general comments are also welcome.
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
209
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
210 Repeat-By:
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
211 ---------
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
212
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
213 * Please replace this item with a description of the sequence of
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
214 events that causes the problem to occur.
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
215
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
216 Fix:
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
217 ---
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
218
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
219 * If possible, replace this item with a description of how to
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
220 fix the problem (if you don't have a fix for the problem, don't
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
221 include this section, but please do submit your report anyway).
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
222
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
223
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
224
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
225 Configuration (please do not edit this section):
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
226 -----------------------------------------------
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
227
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
228 uname output: $UN
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
229 configure opts: $config_opts
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
230 Fortran compiler: $F77
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
231 FFLAGS: $FFLAGS
1064
32ff7b6638a0 [project @ 1995-01-24 14:11:49 by jwe]
jwe
parents: 964
diff changeset
232 FLIBS: $FLIBS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
233 CPPFLAGS: $CPPFLAGS
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
234 INCFLAGS: $INCFLAGS
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
235 C compiler: $CC_AND_VERSION
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
236 CFLAGS: $CFLAGS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
237 CPICFLAG: $CPICFLAG
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
238 C++ compiler: $CXX_AND_VERSION
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
239 CXXFLAGS: $CXXFLAGS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
240 CXXPICFLAG: $CXXPICFLAG
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
241 LD_CXX: $LD_CXX
1064
32ff7b6638a0 [project @ 1995-01-24 14:11:49 by jwe]
jwe
parents: 964
diff changeset
242 LDFLAGS: $LDFLAGS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
243 LIBFLAGS: $LIBFLAGS
2676
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2625
diff changeset
244 RLD_FLAG: $RLD_FLAG
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
245 BLAS_LIBS: $BLAS_LIBS
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
246 FFTW_LIBS: $FFTW_LIBS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
247 LIBS: $LIBS
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
248 LEXLIB: $LEXLIB
3215
bc3fdfe311a3 [project @ 1998-11-10 14:06:21 by jwe]
jwe
parents: 3141
diff changeset
249 LIBGLOB: $LIBGLOB
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
250 SED: $SED
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
251 DEFS:
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
252
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
253 EOF
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
254
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
255 if $HAVE_FMT; then
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
256 echo $DEFS | fmt | $SED 's/^/ /' >> $TEMP
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
257 else
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
258 echo $DEFS >> $TEMP
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
259 fi
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
260
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
261 if test $# -gt 0; then
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
262 if test -f "$1"; then
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
263 cat >> $TEMP << EOF
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
264
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
265 User-preferences (please do not edit this section):
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
266 --------------------------------------------------
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
267
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
268 EOF
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
269 cat $1 >> $TEMP
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
270 fi
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
271 fi
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
272
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
273 chmod u+w $TEMP
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
274 cp $TEMP $TEMP.x
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
275
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
276 status=0
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
277
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
278 editing=true
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
279
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
280 while $editing; do
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
281 if $EDITOR $TEMP; then
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
282 while $editing; do
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
283 echo $echo_n "(a)bort, (e)dit, (l)ist, (s)end? $echo_c"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
284 read ans
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
285 case "$ans" in
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
286 a* | A*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
287 status=1
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
288 editing=false
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
289 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
290 e* | E*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
291 break;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
292 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
293 l* | L*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
294 $PAGER $TEMP
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
295 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
296 s* | S*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
297 editing=false
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
298 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
299 esac
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
300 done
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
301 else
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
302 echo "problems with edit -- no bug report submitted"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
303 status=1
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
304 editing=false
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
305 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
306 done
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
307
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
308 if test $status -eq 0; then
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
309 if cmp -s $TEMP $TEMP.x; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
310 echo "file not changed -- no bug report submitted"
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
311 status=1
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
312 elif test `wc $TEMP | awk '{print $1}'` -eq 0; then
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
313 echo "empty bug report file -- not submitted"
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
314 status=1
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
315 else
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
316
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
317 # Try to extract the recipient address, in case the To: line in the
964
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
318 # message template has been changed. Also get cc: lines.
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
319
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
320 TO_ADDR=`$SED -e '/^--------[ \t]*$/q' $TEMP | $SED -n -e 's/^[Tt][Oo]://p'`
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
321 CC_ADDR=`$SED -e '/^--------[ \t]*$/q' $TEMP | $SED -n -e 's/^[Cc][Cc]://p'`
964
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
322
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
323 if test -z "$TO_ADDR"; then
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
324 echo "no valid \`To:' field found in header -- using $BUGADDR instead"
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
325 else
964
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
326 BUGADDR="$TO_ADDR"
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
327 fi
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
328
964
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
329 BUGADDR="$BUGADDR $CC_ADDR"
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
330
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
331 TMP_SUB=`$SED -e '/^--------[ \t]*$/q' $TEMP | $SED -n -e 's/^Subject://p'`
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
332
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
333 if test -n "$TMP_SUB"; then
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
334 SUBJECT="$TMP_SUB"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
335 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
336
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
337 # Delete the `--------' separator in the message.
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
338
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
339 # Don't pretty-print this. Odd whitespace kills Ultrix AWK!
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
340
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
341 awk 'BEGIN{in_header=1;} /^--------[ \t]*$/ {
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
342 if (in_header) { in_header=0; print ""; next; }
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
343 } { print $0; }' $TEMP > $TEMP.x
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
344
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
345 # Now try to mail it.
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
346
7171
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
347 # indicate that we have not yet sent email successfully
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
348 status=11
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
349
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
350 if test $status -ne 0; then
7171
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
351 ( mailx -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
352 status=$?
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
353 if test $status -ne 0; then
7171
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
354 ( Mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
355 status=$?
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
356 if test $status -ne 0; then
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
357 ( /usr/ucb/mail -s "$SUBJECT" $BUGADDR < $TEMP.x ) > /dev/null 2>&1
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
358 status=$?
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
359 # make /bin/mail our last resort -- it ignores the subject line
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
360 if test $status -ne 0; then
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
361 ( /bin/mail $BUGADDR < $TEMP.x ) > /dev/null 2>&1
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
362 status=$?
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
363 if test $status -ne 0; then
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
364 echo "unable to send mail..."
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
365 fi
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
366 fi
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
367 fi
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
368 fi
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
369 fi
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
370 fi
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
371 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
372
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
373 if test $status -ne 0; then
3082
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
374 dead_bug_file=$HOME/dead-octave-bug
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
375 looking_for_file=true;
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
376 n=1
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
377 while $looking_for_file; do
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
378 if test -f "$dead_bug_file-$n"; then
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
379 n=`expr $n + 1`
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
380 else
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
381 looking_for_file=false
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
382 dead_bug_file=$dead_bug_file-$n
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
383 fi
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
384 done
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
385 echo "saving message in $dead_bug_file";
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
386 cat $TEMP >> $dead_bug_file;
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
387 exit 1
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
388 else
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
389 echo "bug report sent to: $TO_ADDR"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
390 echo " cc to: $CC_ADDR"
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
391 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
392
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
393 exit $status