ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) <nageshbl...@gmail.com>
Subject Set properties based on Operating System.
Date Mon, 17 Oct 2011 14:10:55 GMT
Hi,
I would like to set the values of properties' names differently based on the
OS where the build file would run. Is this already covered ?

Basically, I would like to have something as follows. The os tag has values
set in the same way as it happens with os attribute in exec task. In the
exec task shown below, the properties are automatically set based on the OS.

<Os name="Unix">
<property name="foo" location="/usr/bin/foo"/>
<property name="foo.home" location="/etc/config/foo.config"/>
</Os>

<Os name="Windows">
<property name="foo" location="C:\foo.exe"/>
<property name="foo.home" location="C:\foo\foo.config"/>
</Os>

<exec executable="${foo}><arg value="${foo.home}"/></exec>

N.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message