ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas Kramer <Douglas.Kra...@Sun.COM>
Subject Ant: mkdir if none exists
Date Sun, 06 Feb 2005 17:56:09 GMT
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

    <target name="test">
        <available file="${WORKDIR}/BACKUP" property="file.exists" value="true" />

    <target name="makedir" depends="test" unless="file.exists">
        <mkdir dir="${WORKDIR}/BACKUP" />

Is there a simpler way to do it all in one task?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message