|
From: Mike C. <da...@ix...> - 2003-03-13 00:40:24
|
On Wed, Mar 12, 2003 at 11:42:10AM -0800, Mike Castle wrote:
> If you like this approach I can probably whip up a patch later today.
Well, here it is attached.
It's a bit bigger than I'd like, but the wrapper_win32.c is a bit of a mess
and resulted in a lot of re-indentation.
Anyway, this adds the ability to use %foo% style stuff for anything.
Precedence is command line options, environment variables, then file
contents. I'm not convinced that an enviroment variable should take
precedence of a value specified in .conf, but a simple rearrangement in the
enum will fix that. I suppose if you're really masochistic, you could
change the references to PP_ENV and PP_FILE to something like:
getBooleanProperty(properties, "wrapper.property.env.first", TRUE)?PP_ENV:PP_FILE
and
getBooleanProperty(properties, "wrapper.property.env.first", FALSE)?PP_ENV:PP_FILE
Anyway, this patch also gives you the ability to set enviroment variables
from the .conf file.
FOO=This is foo
wrapper.env.export.1=FOO
You can even get fancy:
FOO=This is foo
BAR=This is bar
BAZ=FOO
wrapper.env.export.1=%BAZ%
With the current implementation, set FOO to something like "This is foo
from the environment" and use the above, and that will be exported again.
Or more likely, export BAZ=BAR and observe the output.
I didn't build the win32 stuff, no MS compiler. Sorry if it doesn't
compile. But I did try to keep it logically similar to the unix side.
Useful?
mrc
--
Mike Castle da...@ix... www.netcom.com/~dalgoda/
We are all of us living in the shadow of Manhattan. -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
|