----- Original Message -----
From: "Barbara Bliss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 1:04 AM
Subject: Newbe: How to get platform-independence - *.bat vs *.sh
> Option 3: find/write a task that determines which os the build is
> running on and set the java.packager.extension property.
Option 3a: find/write a task that determines which os the build is
running on and only executes the command if the os is matching the one I
specified.
See ExecOn in the docs. You can specify an attribute "os" which is matched
against the property "os.name".
You should be able to specify something like
<execon executable="ls" on="Linux">
<arg value="-l"/>
</execon><execon executable="cmd.exe /c dir" on="Windows 2000"/>
To get a directory-listing on Linux or Windows, depending where Ant is
executed.
This is *not* tested, so you may get errors and may to change this to your
needs.
Nico