ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninju Bohra <ninju_bo...@yahoo.com>
Subject Re: Ant: mkdir if none exists
Date Mon, 07 Feb 2005 15:18:59 GMT
The fact that you getting an additional BACKUP
directory created is very strange... I believe the
that contents of the ${WORKDIR} are different than you
believe...it seems un-believable that the <mkdir>
would create an additional level.

Later,

Ninju
--- Douglas Kramer <Douglas.Kramer@Sun.COM> wrote:

> I have this mkdir statement, but on Solaris, if
> BACKUP already
> exists, it creates a BACKUP directory inside of it:
> BACKUP/BACKUP
> 
>        <mkdir dir="${WORKDIR}/BACKUP" />
> 
> I believe this creates a directory only if one
> doesn't
> exist.
> 
>     <target name="test">
>         <available file="${WORKDIR}/BACKUP"
> property="file.exists" value="true" />
>     </target>
> 
>     <target name="makedir" depends="test"
> unless="file.exists">
>         <mkdir dir="${WORKDIR}/BACKUP" />
>     </target>
> 
> Is there a simpler way to do it all in one task?
> 
> -Doug
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

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


Mime
View raw message