You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Nicolas Girard <Ni...@IReS.in2p3.fr> on 2004/07/21 16:13:14 UTC

Apply task and missing directories

Hi all,
i'm trying to automate the generation of png images from dia diagrams.
The idea is to regularly update a cvs sandbox ; then, if one .dia file
is newer than the associated .png file, i'd just like to launch dia
using the 'apply' task.

Here's a subset of the script:
  <target name="GenerateImagesFromDiaDiagrams">
      <mkdir dir="${build.design}"/>
      <apply executable="dia" dest="${build.design}">
        <arg value="-e"/>
        <targetfile/>
        <srcfile/>
        <fileset dir="${src.design}" includes="**/*.dia"/>
        <mapper type="glob" from="*.dia" to="*.png"/>
      </apply>
  </target>

As you can see, I'd like the .png images to be generated into the
build.design directory, which is different from the src.design directory
where the srcfiles remain.

Here's my problem: when dealing with, say file
'${src.design}/a/b/test.dia', I get an error message because the output
directory '${build.design}/a/b/' doesn't exist.

So far I couldn't find an elegant way of creating the missing output
directory before the external program is launched.

Do you have an idea on how to achieve this ?

Many thanks in advance,

cheers,

Nicolas

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