ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Vogel <pvo...@arsin.com>
Subject RE: machine name
Date Sun, 10 Jun 2001 07:12:56 GMT
Yet another case where the idea I just proposed (to set a property's
value from the execution of a process) would be useful...

On windows 2k at least, you could do this:

<property environment="env"/>
<property sysname="${env.COMPUTERNAME}"/>

On unix you could maybe use ${env.HOSTNAME} or, more 
generally uname -n, but at the moment there's no convenient way 
to capture the output of a process in a property.  If you have cygwin
installed on your windows hosts then uname -n would work regardless
of where you are, or you could use the os attribute of an exec 
task that had the added capability of putting its output into 
a property...

-Peter

> -----Original Message-----
> From: Nick Davis [mailto:nick_home_account@yahoo.com]
> Sent: Wednesday, May 23, 2001 9:38 AM
> To: ant-user@jakarta.apache.org
> Subject: machine name
> 
> 
> Hi All,
> 
> Is there a way to determine the machine name
> from ANT without writing a new task?
> 
> Cheers,
> Nick
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 

Mime
View raw message