Allin Cottrell schrieb:
On Tue, 18 Aug 2009, Sven Schreiber wrote:
> relative paths don't work for me on linux when using 'include' in
> scripts, while ironically they seem to work fine on Windows.
> Here's the example:
> # this script 'scriptinlevel2.inp' resides in $HOME/gretlpathtest/level2
> print "hello"
> # this script 'scriptingretlpathtest.inp' resides in $HOME/gretlpathtest
> function pathtest(int yo)
> print "inside function"
> end function
> Now when I run the first script on linux, an error window pops up "no
> such file or directory".
Where are you running the first script from? I'm not sure why you
would expect it to work (to include the second script) unless the
CWD was $HOME/gretlpathtest/level2 (it does work in that case).
Nice theory -- but it doesn't seem to work here! As a "proof" I've
modified to first script to print the active 'workdir', and this is the
output (on Linux, gretl cvs is two days old):
Aktuelle Sitzung: 2009-08-19 10:31
# this script 'scriptinlevel2.inp' resides in $HOME/gretlpathtest/level2
? print "@workdir"
? include ../scriptingretlpathtest.inp
Fehler bei Skriptausführung: Stopp
(And the error window popped up.)
Apart from the possibility that I have a stupid typo somewhere in the
file names (although I double-checked), any other ideas on what could be