ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russ Fink" <russf...@hotmail.com>
Subject Re: newbie - if-then-else task?
Date Thu, 01 Jan 1970 00:00:00 GMT
Okay - I think I understand.  If I have 'dirs.orig' pointing to the global 
area, and dirs.local pointing to the local modified area, and want to put 
the file into 'dest', I can do the following:

<property name="frompath" value="${dirs.orig}/foo"/>
<available file="${dirs.local}/foo" property="frompath"
           value="${dirs.local}/foo"/>
<copy file="${frompath}" todir="${dirs.base}/dest"/>

The first line sets the default to the orig directory; the second line 
overrides the value of 'frompath' if there exists a file in the .local 
directory, and the last line does the copy with whatever the value of the 
variable happens to be.

(This is still a little more work than I indended, but I guess that's why 
there's Perl/Awk to add these lines into my customizations on build.xml.)

Thanks for the help,
Russ



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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


Mime
View raw message