help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling multiple versions on one system


From: Shai Ayal
Subject: Re: compiling multiple versions on one system
Date: Thu, 09 Feb 2006 14:26:43 +0200
User-agent: Thunderbird 1.5 (X11/20051025)

nice. No more manual relinks for me :)
Shai

Jean-Francois Cardoso wrote:
On Feb  8, Shai Ayal wrote:
> I do it all the time with no problems I have like 5 versions of octave > currently installed.
Same here.  I do nothing special at build/install but I use small
script (see below) to switch quickly between versions.  Of course, it
must be invoked via "sudo" if the default install location is used.

HTH
JFC


################################################################
#!/bin/bash


if [ -z  $1  ] ; then
    echo usage: octave_switch.sh  xx.yy.zz
    echo This will make octave version xx.yy.zz the default version
    exit 1 ;
else
    VERSION=$1 ;
fi


BASE=/usr/local/bin

OCT_BIN=$BASE/octave
OCT_MKO=$BASE/mkoctfile
OCT_CFG=$BASE/octave-config
OCT_BUG=$BASE/octave-bug


doingit () { LINK=$1 ;
    REAL=$1-$2
if [ -h $LINK -a -f $REAL ] ; then echo Removing symbolic link $LINK
        rm $LINK
    fi
echo Creating new link pointing to $REAL ; ln -s $REAL $LINK

}

doingit $OCT_BIN $VERSION
doingit $OCT_MKO $VERSION
doingit $OCT_CFG $VERSION
doingit $OCT_BUG $VERSION

################################################################



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]