forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eirik Bjørsnøs <bjors...@stud.ntnu.no>
Subject [PATCH] Invoking forrest with relative path
Date Fri, 23 Jan 2004 15:01:04 GMT

Hello,

When invoking forrest with a relative path, like this:

$ cd /home/bjorsnos/xml-forrest
$ build/dist/shbat/bin/forrest run

I get an internal server error on http://localhost:8888/index.html with
the following cause:

/home/bjorsnos/xml-forrest/build/webapp/build/dist/shbat/context/skins/forrest-site/xslt/html/site2xhtml.xsl
(No such file or directory)

When invoking forrest with an absolute path:
$ /home/bjorsnos/xml-forrest/build/dist/shbat/forrest run
everything works nice.

I guess the reason is that ${forrest.home} is set to "build/dist/shbat/"
which is then appended to jetty's work-dir which is build/webapp

Currently, the forrest shell script finds FORREST_HOME by doing:
FORREST_HOME=`dirname "$0"`/..

I changed this line to:
FORREST_HOME=$(cd $(eval "dirname $0")/..;pwd)

FORREST_HOME is now the absolute path name of the forrest home directory,
and the problem is fixed.

The attached patch contains the fix. My only concern is if this will work
also on cygwin, and I'd be happy if someone could test it.

Eirik.
-- 
Eirik Bjørsnøs
bjorsnos@stud.ntnu.no
Mime
View raw message