comparison install-octave.in @ 4084:babc519f245b

[project @ 2002-10-03 03:23:14 by jwe]
author jwe
date Thu, 03 Oct 2002 03:23:15 +0000
parents 41e7fa40ff4c
children 92f4552ea359
comparison
equal deleted inserted replaced
4083:9a1bdd7fff3e 4084:babc519f245b
9 9
10 # Exit on any error. 10 # Exit on any error.
11 11
12 set -e 12 set -e
13 13
14 SED=@SED@
15
14 # get version 16 # get version
15 version=`cat VERSION 2> /dev/null` 17 version=`cat VERSION 2> /dev/null`
16 18
17 if test -z "$version" 19 if test -z "$version"
18 then 20 then
44 # Check whether to use -n or \c to keep echo from printing a newline 46 # Check whether to use -n or \c to keep echo from printing a newline
45 # character. Stolen from autoconf, which borrowed the idea from dist 3.0. 47 # character. Stolen from autoconf, which borrowed the idea from dist 3.0.
46 48
47 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 49 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
48 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 50 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
49 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 51 if (echo -n testing; echo 1,2,3) | $SED s/-n/xn/ | grep xn >/dev/null; then
50 echo_n= 52 echo_n=
51 echo_c=' 53 echo_c='
52 ' 54 '
53 else 55 else
54 echo_n=-n 56 echo_n=-n
174 176
175 cat << EOF 177 cat << EOF
176 Installing octave in the following subdirectories of 178 Installing octave in the following subdirectories of
177 $prefix: 179 $prefix:
178 180
179 bindir: `echo $bindir | sed "s,^$prefix/,,"` 181 bindir: `echo $bindir | $SED "s,^$prefix/,,"`
180 datadir: `echo $datadir | sed "s,^$prefix/,,"` 182 datadir: `echo $datadir | $SED "s,^$prefix/,,"`
181 libdir: `echo $libdir | sed "s,^$prefix/,,"` 183 libdir: `echo $libdir | $SED "s,^$prefix/,,"`
182 octlibdir: `echo $octlibdir | sed "s,^$prefix/,,"` 184 octlibdir: `echo $octlibdir | $SED "s,^$prefix/,,"`
183 includedir: `echo $includedir | sed "s,^$prefix/,,"` 185 includedir: `echo $includedir | $SED "s,^$prefix/,,"`
184 octincludedir: `echo $octincludedir | sed "s,^$prefix/,,"` 186 octincludedir: `echo $octincludedir | $SED "s,^$prefix/,,"`
185 mandir: `echo $mandir | sed "s,^$prefix/,,"` 187 mandir: `echo $mandir | $SED "s,^$prefix/,,"`
186 infodir: `echo $infodir | sed "s,^$prefix/,,"` 188 infodir: `echo $infodir | $SED "s,^$prefix/,,"`
187 fcnfiledir: `echo $fcnfiledir | sed "s,^$prefix/,,"` 189 fcnfiledir: `echo $fcnfiledir | $SED "s,^$prefix/,,"`
188 localfcnfiledir: `echo $localfcnfiledir | sed "s,^$prefix/,,"` 190 localfcnfiledir: `echo $localfcnfiledir | $SED "s,^$prefix/,,"`
189 archlibdir: `echo $archlibdir | sed "s,^$prefix/,,"` 191 archlibdir: `echo $archlibdir | $SED "s,^$prefix/,,"`
190 localarchlibdir: `echo $localarchlibdir | sed "s,^$prefix/,,"` 192 localarchlibdir: `echo $localarchlibdir | $SED "s,^$prefix/,,"`
191 octfiledir: `echo $octfiledir | sed "s,^$prefix/,,"` 193 octfiledir: `echo $octfiledir | $SED "s,^$prefix/,,"`
192 localoctfiledir: `echo $localoctfiledir | sed "s,^$prefix/,,"` 194 localoctfiledir: `echo $localoctfiledir | $SED "s,^$prefix/,,"`
193 imagedir: `echo $imagedir | sed "s,^$prefix/,,"` 195 imagedir: `echo $imagedir | $SED "s,^$prefix/,,"`
194 196
195 EOF 197 EOF
196 198
197 echo $echo_n "Is this correct [y/N]? " $echo_c 199 echo $echo_n "Is this correct [y/N]? " $echo_c
198 200
293 echo "installing src/octave as $bindir/octave" 295 echo "installing src/octave as $bindir/octave"
294 cp src/octave $bindir/octave 296 cp src/octave $bindir/octave
295 chmod 755 $bindir/octave 297 chmod 755 $bindir/octave
296 else 298 else
297 echo "installing octave-sh as $bindir/octave" 299 echo "installing octave-sh as $bindir/octave"
298 sed "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$octlibdir|" octave-sh \ 300 $SED "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$octlibdir|" octave-sh \
299 > $bindir/octave 301 > $bindir/octave
300 chmod 755 $bindir/octave 302 chmod 755 $bindir/octave
301 303
302 echo "installing src/octave as $bindir/octave.bin" 304 echo "installing src/octave as $bindir/octave.bin"
303 cp src/octave $bindir/octave.bin 305 cp src/octave $bindir/octave.bin