hdoc_to_optim.ant 982 Bytes
Newer Older
Drain's avatar
Drain committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<project name="hdoc_to_optim" default="convert">
    <target name="convert">
        <!--unzips the hdoc to be converted-->
        <unzip dest="hdoc" src ="${InputPath}"/>
        <!--gives all rights to avoid bugs-->
        <chmod dir="hdoc" perm="777"/>
        <!--launches the XSLT find_content to retrieve the content path-->
        <xslt in="hdoc/META-INF/container.xml" out="get_content.ant" style="find_content.xsl"/>
        <chmod file="get_content.ant" perm="777"/>
        <!--launches the ANT get_content resulting from the previous XSLT in order to launch the conversion-->
        <ant antfile="get_content.ant"/>
        <!--once the conversion is complete, the result is zipped-->
        <zip basedir="result" destfile="${OutputPath}"/>
        <!--temporary files and folders are deleted-->
        <delete dir="hdoc"/>
        <delete dir="result"/>
        <delete file="get_content.ant"/>
        <delete file="get_ressources.ant"/>
    </target>
</project>