Mercurial > hg > octave-nkf
diff install-octave.in @ 3474:9c68cfa263eb
[project @ 2000-01-25 10:17:55 by jwe]
author | jwe |
---|---|
date | Tue, 25 Jan 2000 10:17:56 +0000 |
parents | fbb332b96e4f |
children | d68c34dc9c25 |
line wrap: on
line diff
--- a/install-octave.in +++ b/install-octave.in @@ -7,6 +7,10 @@ # University of Wisconsin-Madison # Department of Chemical Engineering +# Exit on any error. + +set -e + # get version version=`cat VERSION 2> /dev/null` @@ -209,22 +213,6 @@ ./mkinstalldirs $DIRS_TO_MAKE -if test "$prefix" = /usr/local -then - echo "installing src/octave as $bindir/octave" - cp src/octave $bindir/octave - chmod 755 $bindir/octave -else - echo "installing octave-sh as $bindir/octave" - sed "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$octlibdir|" octave-sh \ - > $bindir/octave - chmod 755 $bindir/octave - - echo "installing src/octave as $bindir/octave.bin" - cp src/octave $bindir/octave.bin - chmod 755 $bindir/octave.bin -fi - echo "installing octave-bug as $bindir/octave-bug" cp octave-bug $bindir/octave-bug chmod 755 $bindir/octave-bug @@ -292,6 +280,26 @@ cp doc/interpreter/octave.1 $mandir/octave.$manext chmod 644 $mandir/octave.$manext +# Do this last, so that it won't be available if some other error +# happens earlier. Otherwise, people might try to run Octave with +# an incomplete installation. + +if test "$prefix" = /usr/local +then + echo "installing src/octave as $bindir/octave" + cp src/octave $bindir/octave + chmod 755 $bindir/octave +else + echo "installing octave-sh as $bindir/octave" + sed "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$octlibdir|" octave-sh \ + > $bindir/octave + chmod 755 $bindir/octave + + echo "installing src/octave as $bindir/octave.bin" + cp src/octave $bindir/octave.bin + chmod 755 $bindir/octave.bin +fi + case "$canonical_host_type" in *-*-cygwin32) if $alt_dir; then