ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray Tayek <>
Subject how to echo out the os and os family
Date Mon, 02 Jun 2003 10:51:35 GMT
hi, trying to get a project to work on a few platforms (and in netbeans 
with junit). having trouble getting the os and os family to echo out. i can 
get the following ok (see below). but i can not seem to echo out the os or 
os family, so i get a bunch of funnty printouts when i run this as only one 
has a value other than itself (ie. isDos=${isDis} prints out on unix, while 
isUnit=true comes out on unix). how do i get rid of this?


         <target name="init">
                 <property environment="env"/>
                 <condition property="isDos"> <os family="dos"/> </condition>
                 <echo message="isDos=${isDos}"/>
                 <condition property="isUnix"> <os family="unix"/> </condition>
                 <echo message="isUnix=${isUnix}"/>
                 <condition property="isMac"> <os family="mac"/> </condition>
                 <echo message="isMac=${isMac}"/>
                 <condition property="isMacButNotMacOsX">
                                 <os family="mac" />
                                 <not><os family="unix" /></not>
                 <echo message="isMacButNotMacOsX=${isMacButNotMacOsX}"/>
                 <echo message="${os}"/>
                 <echo message="${os family}"/>
                 <condition property="tmp" value="${env.TMP}"> <istrue 
value="${isDos}"/> </condition>
                 <condition property="tmp" value="/tmp"> <istrue 
value="${isUnix}"/> </condition>
                 <!--more needed for mac cases-->
                 <echo message="tmp=${tmp}"/>
                 <condition property="junitPath" value="../junit3.7"> <os 
family="unix"/> </condition>
                 <condition property="junitPath" value="../junit3.8.1"> <os 
family="dos"/> </condition>
                 <!--more needed for mac cases-->
                 <echo message="junitPath=${junitPath}"/>

ray tayek actively seeking mentoring or telecommuting work
vice chair orange county java users group
hate spam?

View raw message