ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject Re: env.COMPUTERNAME not working in linux
Date Tue, 26 Feb 2008 18:39:31 GMT
Hi,

Samuel Monsarrat wrote:
>> Is COMPUTERNAME only for windows? Is there any workaround to print the
>> hostname(Linux)?
>>   
> Indeed yes COMPUTERNAME is a Windows standard env variable that does not
> exist on linux. env.xxxx is dangerous in a multi-os build system, as you
> are accessing the underlying operating system variables, you are
> therefore no longer platform independent.

<exec executable="hostname" outputproperty="computer.hostname"/>

will work on both, linux and windows

Regards, Gilbert


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message