help-octave
[Top][All Lists]
Advanced

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

Re: octave shebang


From: Mike Miller
Subject: Re: octave shebang
Date: Wed, 13 Jul 2005 09:17:42 -0500 (CDT)

On Wed, 13 Jul 2005, Stefan van der Walt wrote:

I'm looking for an octave shebang which doesn't depend on where octave is installed but instead picks it up from the path.

I assume this is for portability reasons. It might be good to use an install script. One way would be to make scripts without a first line, then have something like this generate the initial line for every script:

echo "#\!`which octave` -q"

Or, you might use perl or sed to change the first line if it doesn't match the path to Octave.

If you can assume that the user has root permissions, you can write the scripts to point to /usr/local/bin/octave, say, and if octave is actually installed elsewhere, write a symbolic link in /usr/local/bin:

ln -s `which octave` /usr/local/bin/octave

I think that would create the correct link.

Mike



-------------------------------------------------------------
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]