You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Matt Fair <ma...@netasol.com> on 2001/08/11 04:26:53 UTC
/bin/sh
Is there a way to grab OS evironment variables?
For example:
#!/bin/sh
export opensimpx_serverhost="opensimpx.org"
---------------------
<property name="opensimpx_serverhost" value="${opensimpx_serverhost}"/>
But when I do this I have opensimpx_server as "${opensimpx_serverhost}" not
"opensimpx.org"
Thanks
Matt
Re: /bin/sh
Posted by Erik Hatcher <er...@earthlink.net>.
Yes, its a 1.3+ feature.
Erik
----- Original Message -----
From: "Matt Fair" <ma...@netasol.com>
To: <an...@jakarta.apache.org>
Sent: Saturday, August 11, 2001 7:11 AM
Subject: Re: /bin/sh
> When I added:
> <property environment="env"/>
> I get this:
> BUILD FAILED
>
> Class org.apache.tools.ant.taskdefs.Property doesn't support the
> "environment" attribute
>
> I am using the debian package of ant wich is verision 1.2-1, is this
feature
> only in version 1.3?
>
> Thanks,
> Matt
> On Friday 10 August 2001 22:44, you wrote:
> > Read the docs on the <property> tag. But essentially its like this:
> >
> > <property environment="env"/>
> >
> > and then you'd have all environment variables prefixed by "env.".
> >
> > Erik
> >
> >
> > ----- Original Message -----
> > From: "Matt Fair" <ma...@netasol.com>
> > To: <an...@jakarta.apache.org>
> > Sent: Friday, August 10, 2001 7:26 PM
> > Subject: /bin/sh
> >
> > > Is there a way to grab OS evironment variables?
> > >
> > > For example:
> > >
> > > #!/bin/sh
> > > export opensimpx_serverhost="opensimpx.org"
> > >
> > > ---------------------
> > > <property name="opensimpx_serverhost"
value="${opensimpx_serverhost}"/>
> > >
> > > But when I do this I have opensimpx_server as
"${opensimpx_serverhost}"
> >
> > not
> >
> > > "opensimpx.org"
> > >
> > > Thanks
> > > Matt
Re: /bin/sh
Posted by Matt Fair <ma...@netasol.com>.
When I added:
<property environment="env"/>
I get this:
BUILD FAILED
Class org.apache.tools.ant.taskdefs.Property doesn't support the
"environment" attribute
I am using the debian package of ant wich is verision 1.2-1, is this feature
only in version 1.3?
Thanks,
Matt
On Friday 10 August 2001 22:44, you wrote:
> Read the docs on the <property> tag. But essentially its like this:
>
> <property environment="env"/>
>
> and then you'd have all environment variables prefixed by "env.".
>
> Erik
>
>
> ----- Original Message -----
> From: "Matt Fair" <ma...@netasol.com>
> To: <an...@jakarta.apache.org>
> Sent: Friday, August 10, 2001 7:26 PM
> Subject: /bin/sh
>
> > Is there a way to grab OS evironment variables?
> >
> > For example:
> >
> > #!/bin/sh
> > export opensimpx_serverhost="opensimpx.org"
> >
> > ---------------------
> > <property name="opensimpx_serverhost" value="${opensimpx_serverhost}"/>
> >
> > But when I do this I have opensimpx_server as "${opensimpx_serverhost}"
>
> not
>
> > "opensimpx.org"
> >
> > Thanks
> > Matt
Re: /bin/sh
Posted by Erik Hatcher <er...@earthlink.net>.
Read the docs on the <property> tag. But essentially its like this:
<property environment="env"/>
and then you'd have all environment variables prefixed by "env.".
Erik
----- Original Message -----
From: "Matt Fair" <ma...@netasol.com>
To: <an...@jakarta.apache.org>
Sent: Friday, August 10, 2001 7:26 PM
Subject: /bin/sh
> Is there a way to grab OS evironment variables?
>
> For example:
>
> #!/bin/sh
> export opensimpx_serverhost="opensimpx.org"
>
> ---------------------
> <property name="opensimpx_serverhost" value="${opensimpx_serverhost}"/>
>
> But when I do this I have opensimpx_server as "${opensimpx_serverhost}"
not
> "opensimpx.org"
>
> Thanks
> Matt