[plt-scheme] Running mzscheme command line scripts
On May 6, Tommy Nordgren wrote:
>
> On 6 maj 2006, at 11.57, Tommy Nordgren wrote:
>
> >
> > On 6 maj 2006, at 02.21, Noel Welsh wrote:
> >
> >> http://schemecookbook.org/Cookbook/GettingStartedCollectionSearchPath
> >>
> >> It certainly isn't a complete discussion but should help you.
> >
> > One thing I wonder is what effects it have to set the
> > PLTCOLLECTS environment variable. Is it appended/prepended to the
> > default search path, or does it override it?
>
> I've been able to test this with an existing script. Wether standard
> paths is included depends
> on wether the paths passed in PLTCOLLECTS include an empty path.
> For example, with the bash shell:
> >PLTCOLLECTS=~/libs: mzscheme -r script ## Will find standard libraries
> >PLTCOLLECTS=~/libs mzscheme -r script ## Will NOT find standard
> libraries.
> (NOTE) On Windows, use semicolon instead
Right, and the location of the empty path determines if you're
appending or prepending stuff onto it. This behavior makes sense,
because you can do this:
PLTCOLLECTS="$PLTCOLLECTS:$HOME/libs"
and it will work in the same way if PLTCOLLECTS does or does not have
a value.
I edited that page with this information, and also improved the code a
little (using `this-expression-source-directory' instead of
`current-directory').
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://www.barzilay.org/ Maze is Life!