forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: forrestbot FORREST_HOME problem
Date Thu, 28 Nov 2002 06:00:46 GMT
On Wed, Nov 27, 2002 at 06:24:49PM +0100, Bruno Dumon wrote:
> Hi,
> I'm trying to use the forrestbot (and have it running now), but I
> stumbled upon the following problem.
> The forrestbot script (from the generated shbat/bin directory) sets the
> FORREST_HOME to `dirname "$0"`/.. , which in my case results in ./..
> (I'm starting the forrestbot script from the shbat/bin directory, using
> bash shell in Linux).

Same here.
> The fact that this is a relative path causes trouble further on in the
> bot process (more specifically when using the "local-copy" type of
> get-src, because it will then execute the from another
> working directory).

What problems does it cause?

template.get-src.local-copy has:

    <ant dir="${get-src.local-copy.project-dir}"
      antfile="${forrest.home}/" target="project-context-bot">

Running the samples/forrest-template-local.xml script, that expands for me to:

<ant dir="../../fresh-site"

Which seems to work okay..

> Anyhow, setting FORREST_HOME myself and disabling the line
> "FORREST_HOME=`dirname "$0"`/.." in the forrestbot script solves this.

Currently both 'forrest' and 'forrestbot' scripts use `dirname $0` to set
FORREST_HOME, ignoring any local setting.  IMO setting env variables is a PITA
that should be avoided..


> So to fix this, we should probably check if the FORREST_HOME is set and
> if not either display an error message or set it to some default (but
> then one that at least works for some). Opinions?
> Regards,
> Bruno
> -- 
> Bruno Dumon                   
> Outerthought - Open Source, Java & XML Competence Support Center

View raw message