annotate octave-bug.in @ 7948:af10baa63915 ss-3-1-50

3.1.50 snapshot
author John W. Eaton <jwe@octave.org>
date Fri, 18 Jul 2008 17:42:48 -0400
parents c5a024013d2d
children a3237ae32c0d
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,
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 5994
diff changeset
4 # 2005, 2006 John W. Eaton
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 F2C=%OCTAVE_CONF_F2C%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
39 F2CFLAGS=%OCTAVE_CONF_F2CFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
40 CPPFLAGS=%OCTAVE_CONF_CPPFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
41 INCFLAGS=%OCTAVE_CONF_INCFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
42 CC=%OCTAVE_CONF_CC%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
43 CC_VERSION=%OCTAVE_CONF_CC_VERSION%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
44 CFLAGS=%OCTAVE_CONF_CFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
45 CPICFLAG=%OCTAVE_CONF_CPICFLAG%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
46 CXX=%OCTAVE_CONF_CXX%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
47 CXX_VERSION=%OCTAVE_CONF_CXX_VERSION%
3681
df54d394acc0 [project @ 2000-06-26 17:46:58 by jwe]
jwe
parents: 3590
diff changeset
48 CXXFLAGS=%OCTAVE_CONF_CXXFLAGS%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
49 CXXPICFLAG=%OCTAVE_CONF_CXXPICFLAG%
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
50 LD_CXX=%OCTAVE_CONF_LD_CXX%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
51 LDFLAGS=%OCTAVE_CONF_LDFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
52 LIBFLAGS=%OCTAVE_CONF_LIBFLAGS%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
53 RLD_FLAG=%OCTAVE_CONF_RLD_FLAG%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
54 LIBS=%OCTAVE_CONF_LIBS%
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
55 BLAS_LIBS=%OCTAVE_CONF_BLAS_LIBS%
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
56 FFTW_LIBS=%OCTAVE_CONF_FFTW_LIBS%
3590
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
57 LEXLIB=%OCTAVE_CONF_LEXLIB%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
58 LIBGLOB=%OCTAVE_CONF_LIBGLOB%
a31ee5c3b66c [project @ 2000-02-08 10:09:05 by jwe]
jwe
parents: 3215
diff changeset
59 DEFS=%OCTAVE_CONF_DEFS%
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
60
3082
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
61 : ${USER=$LOGNAME}
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
62
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
63 CC_AND_VERSION=
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
64 if test -n "$CC_VERSION"; then
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
65 CC_AND_VERSION="$CC, version $CC_VERSION"
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
66 fi
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
67
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
68 CXX_AND_VERSION=
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
69 if test -n "$CXX_VERSION"; then
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
70 CXX_AND_VERSION="$CXX, version $CXX_VERSION"
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
71 fi
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
72
846
8d85d95c43e6 [project @ 1994-10-20 21:15:00 by jwe]
jwe
parents: 801
diff changeset
73 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
74 export PATH
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
75
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
76 TEMP=/tmp/octave-bug.$$
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
77
5111
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
78 if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
79 if [ -x /usr/bin/editor ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
80 DEFEDITOR=editor
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
81 elif [ -x /usr/local/bin/ce ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
82 DEFEDITOR=ce
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
83 elif [ -x /usr/local/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/contrib/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/emacs ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
88 DEFEDITOR=emacs
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
89 elif [ -x /usr/bin/xemacs ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
90 DEFEDITOR=xemacs
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
91 elif [ -x /usr/contrib/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/local/bin/jove ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
94 DEFEDITOR=jove
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
95 elif [ -x /usr/bin/vi ]; then
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
96 DEFEDITOR=vi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
97 else
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
98 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
99 DEFEDITOR=vi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
100 fi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
101 fi
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
102
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
103 : ${EDITOR=$DEFEDITOR}
aa9bc151d2fa [project @ 2005-01-19 03:15:31 by jwe]
jwe
parents: 5041
diff changeset
104
5229
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
105 if [ -z "$DEFPAGER" ] && [ -z "$PAGER" ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
106 if [ -x /usr/bin/pager ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
107 DEFPAGER=pager
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
108 elif [ -x /usr/bin/less ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
109 DEFPAGER=less
5230
9ecae85335fa [project @ 2005-03-22 02:57:32 by jwe]
jwe
parents: 5229
diff changeset
110 elif [ -x /bin/less ]; then
5229
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/local/bin/less ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
113 DEFPAGER=less
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
114 elif [ -x /usr/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 /bin/more ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
117 DEFPAGER=more
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
118 elif [ -x /usr/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 elif [ -x /bin/pg ]; then
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
121 DEFPAGER=pg
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
122 else
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
123 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
124 DEFPAGER=more
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
125 fi
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
126 fi
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
127
9b0ff1aefcbe [project @ 2005-03-21 20:37:44 by jwe]
jwe
parents: 5111
diff changeset
128 : ${PAGER=$DEFPAGER}
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
129
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
130 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
131 trap 'rm -f $TEMP $TEMP.x' 0
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
132
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
133 UN=
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
134 if (uname) > /dev/null 2>&1; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
135 UN=`uname -a`
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
136 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
137
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
138 HAVE_FMT=false
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
139 if (fmt < /dev/null) > /dev/null 2>&1; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
140 HAVE_FMT=true
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
141 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
142
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
143 # 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
144 # 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
145
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
146 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
147 # 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
148 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
149 echo_n=
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
150 echo_c='
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
151 '
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
152 else
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
153 echo_n=-n
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
154 echo_c=
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
155 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
156 else
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
157 echo_n=
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
158 echo_c='\c'
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
159 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
160
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
161 ss_p=`echo $VERSION | grep "^ss-"`
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
162 if test -n "$ss_p"; then
5041
b2ce28713791 [project @ 2004-10-01 18:12:10 by jwe]
jwe
parents: 4084
diff changeset
163 BUGADDR="maintainers@octave.org"
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
164 else
2691
3dda19091c08 [project @ 1997-02-18 09:40:56 by jwe]
jwe
parents: 2676
diff changeset
165 pretest_p=`echo $VERSION \
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
166 | $SED 's,.*\.\([0-9]*\).*,\1,' \
2691
3dda19091c08 [project @ 1997-02-18 09:40:56 by jwe]
jwe
parents: 2676
diff changeset
167 | grep -v '\.' \
3dda19091c08 [project @ 1997-02-18 09:40:56 by jwe]
jwe
parents: 2676
diff changeset
168 | grep '[0-9]'`
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
169
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
170 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
171 BUGADDR="maintainers@octave.org"
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
172 else
5041
b2ce28713791 [project @ 2004-10-01 18:12:10 by jwe]
jwe
parents: 4084
diff changeset
173 BUGADDR="bug@octave.org"
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
174 fi
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
175 fi
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
176
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
177 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
178 if test $# -gt 0; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
179 case "$1" in
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
180 -s)
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
181 shift
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
182 if test $# -gt 0; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
183 SUBJECT="$1"
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
184 shift
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
185 else
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
186 echo "usage: octave-bug [-s subject]"
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
187 exit 1
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
188 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
189 ;;
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
190 esac
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
191 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
192
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
193 cat > $TEMP << EOF
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
194 To: $BUGADDR
3082
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
195 EOF
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
196 if test -n "$USER"; then
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
197 cat >> $TEMP << EOF
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
198 Cc: $USER
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
199 EOF
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
200 fi
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
201 cat >> $TEMP << EOF
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
202 Subject: $SUBJECT
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
203 --------
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
204 Bug report for Octave $VERSION configured for $MACHINE
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 Description:
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
207 -----------
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
208
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
209 * Please replace this item with a detailed description of the
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
210 problem. Suggestions or general comments are also welcome.
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 Repeat-By:
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
213 ---------
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
214
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
215 * 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
216 events that causes the problem to occur.
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 Fix:
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
219 ---
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
220
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
221 * 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
222 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
223 include this section, but please do submit your report anyway).
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
224
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
225
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 Configuration (please do not edit this section):
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
228 -----------------------------------------------
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
229
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
230 uname output: $UN
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
231 configure opts: $config_opts
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
232 Fortran compiler: $F77
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
233 FFLAGS: $FFLAGS
1064
32ff7b6638a0 [project @ 1995-01-24 14:11:49 by jwe]
jwe
parents: 964
diff changeset
234 F2C: $F2C
32ff7b6638a0 [project @ 1995-01-24 14:11:49 by jwe]
jwe
parents: 964
diff changeset
235 F2CFLAGS: $F2CFLAGS
32ff7b6638a0 [project @ 1995-01-24 14:11:49 by jwe]
jwe
parents: 964
diff changeset
236 FLIBS: $FLIBS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
237 CPPFLAGS: $CPPFLAGS
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
238 INCFLAGS: $INCFLAGS
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
239 C compiler: $CC_AND_VERSION
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
240 CFLAGS: $CFLAGS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
241 CPICFLAG: $CPICFLAG
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
242 C++ compiler: $CXX_AND_VERSION
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
243 CXXFLAGS: $CXXFLAGS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
244 CXXPICFLAG: $CXXPICFLAG
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
245 LD_CXX: $LD_CXX
1064
32ff7b6638a0 [project @ 1995-01-24 14:11:49 by jwe]
jwe
parents: 964
diff changeset
246 LDFLAGS: $LDFLAGS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
247 LIBFLAGS: $LIBFLAGS
2676
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2625
diff changeset
248 RLD_FLAG: $RLD_FLAG
3859
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
249 BLAS_LIBS: $BLAS_LIBS
890a7e4c1362 [project @ 2001-11-09 17:05:08 by jwe]
jwe
parents: 3822
diff changeset
250 FFTW_LIBS: $FFTW_LIBS
2155
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
251 LIBS: $LIBS
85fd0a6f3c97 [project @ 1996-05-13 09:02:48 by jwe]
jwe
parents: 2138
diff changeset
252 LEXLIB: $LEXLIB
3215
bc3fdfe311a3 [project @ 1998-11-10 14:06:21 by jwe]
jwe
parents: 3141
diff changeset
253 LIBGLOB: $LIBGLOB
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
254 SED: $SED
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
255 DEFS:
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
256
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
257 EOF
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
258
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
259 if $HAVE_FMT; then
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
260 echo $DEFS | fmt | $SED 's/^/ /' >> $TEMP
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
261 else
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
262 echo $DEFS >> $TEMP
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
263 fi
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
264
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
265 if test $# -gt 0; then
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
266 if test -f "$1"; then
801
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
267 cat >> $TEMP << EOF
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
268
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
269 User-preferences (please do not edit this section):
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
270 --------------------------------------------------
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
271
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
272 EOF
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
273 cat $1 >> $TEMP
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
274 fi
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
275 fi
cbc37d8d0fdf [project @ 1994-10-13 17:03:23 by jwe]
jwe
parents: 797
diff changeset
276
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
277 chmod u+w $TEMP
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
278 cp $TEMP $TEMP.x
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
279
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
280 status=0
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
281
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
282 editing=true
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
283
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
284 while $editing; do
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
285 if $EDITOR $TEMP; then
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
286 while $editing; do
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
287 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
288 read ans
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
289 case "$ans" in
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
290 a* | A*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
291 status=1
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
292 editing=false
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
293 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
294 e* | E*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
295 break;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
296 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
297 l* | L*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
298 $PAGER $TEMP
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
299 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
300 s* | S*)
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
301 editing=false
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
302 ;;
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
303 esac
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
304 done
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
305 else
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
306 echo "problems with edit -- no bug report submitted"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
307 status=1
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
308 editing=false
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
309 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
310 done
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
311
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
312 if test $status -eq 0; then
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
313 if cmp -s $TEMP $TEMP.x; then
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
314 echo "file not changed -- no bug report submitted"
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
315 status=1
2031
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
316 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
317 echo "empty bug report file -- not submitted"
1d249e745b33 [project @ 1996-03-26 08:41:10 by jwe]
jwe
parents: 1451
diff changeset
318 status=1
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
319 else
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
320
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
321 # 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
322 # 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
323
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
324 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
325 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
326
2222
a2e240d3f336 [project @ 1996-05-17 08:00:55 by jwe]
jwe
parents: 2159
diff changeset
327 if test -z "$TO_ADDR"; then
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
328 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
329 else
964
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
330 BUGADDR="$TO_ADDR"
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
331 fi
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
332
964
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
333 BUGADDR="$BUGADDR $CC_ADDR"
9c2b69170142 [project @ 1994-12-09 19:32:01 by jwe]
jwe
parents: 857
diff changeset
334
4084
babc519f245b [project @ 2002-10-03 03:23:14 by jwe]
jwe
parents: 3859
diff changeset
335 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
336
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
337 if test -n "$TMP_SUB"; then
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
338 SUBJECT="$TMP_SUB"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
339 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
340
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
341 # Delete the `--------' separator in the message.
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
342
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
343 # 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
344
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
345 awk 'BEGIN{in_header=1;} /^--------[ \t]*$/ {
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
346 if (in_header) { in_header=0; print ""; next; }
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
347 } { print $0; }' $TEMP > $TEMP.x
851
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
348
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
349 # Now try to mail it.
f08046777694 [project @ 1994-10-21 01:21:13 by jwe]
jwe
parents: 850
diff changeset
350
7171
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
351 # indicate that we have not yet sent email successfully
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
352 status=11
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
353
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
354 if test $status -ne 0; then
7171
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
355 ( 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
356 status=$?
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
357 if test $status -ne 0; then
7171
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
358 ( 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
359 status=$?
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 ( /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
362 status=$?
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
363 # 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
364 if test $status -ne 0; then
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
365 ( /bin/mail $BUGADDR < $TEMP.x ) > /dev/null 2>&1
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
366 status=$?
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
367 if test $status -ne 0; then
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
368 echo "unable to send mail..."
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
369 fi
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
370 fi
9bc096bc59d4 [project @ 2007-11-13 18:02:51 by jwe]
jwe
parents: 7019
diff changeset
371 fi
1066
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
372 fi
ed077e7b5bcb [project @ 1995-01-25 15:18:39 by jwe]
jwe
parents: 1064
diff changeset
373 fi
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
374 fi
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
375 fi
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
376
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
377 if test $status -ne 0; then
3082
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
378 dead_bug_file=$HOME/dead-octave-bug
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
379 looking_for_file=true;
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
380 n=1
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
381 while $looking_for_file; do
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
382 if test -f "$dead_bug_file-$n"; then
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
383 n=`expr $n + 1`
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
384 else
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
385 looking_for_file=false
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
386 dead_bug_file=$dead_bug_file-$n
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
387 fi
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
388 done
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
389 echo "saving message in $dead_bug_file";
7fa66715abc1 [project @ 1997-08-26 18:36:42 by jwe]
jwe
parents: 2831
diff changeset
390 cat $TEMP >> $dead_bug_file;
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
391 exit 1
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
392 else
2564
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
393 echo "bug report sent to: $TO_ADDR"
ac70da7eeedc [project @ 1996-12-05 22:36:41 by jwe]
jwe
parents: 2236
diff changeset
394 echo " cc to: $CC_ADDR"
797
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
395 fi
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
396
21d1e55ee02c [project @ 1994-10-13 04:47:12 by jwe]
jwe
parents:
diff changeset
397 exit $status