framapad_to_opale.ant 2.67 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
3
    <property file="framapad_to_opale.properties"/>    
Jean Vintache's avatar
Jean Vintache committed
4
    <!-- CHECK FOR OS FAMILY -->
jcomedouteau's avatar
jcomedouteau committed
5 6 7 8 9 10
    <condition property="is_windows">
        <os family="windows"/>
    </condition>
    <condition property="is_unix">
        <os family="unix"/>
    </condition>
11

12
    <target name="to_hdoc_init">
13 14 15 16 17
     
    </target>

    <target name="to_hdoc_windows" if="${is_windows}">
    	<delete>
jcomedouteau's avatar
jcomedouteau committed
18
            <fileset dir="${eth_in}">
19 20 21
                <include name="*.html"/>
            </fileset>
        </delete>
22 23 24 25
        <copy todir="${eth_in}">
            <fileset dir="${in}">
                <include name="*.html"/>
            </fileset>
26
        </copy> 
27
        <exec dir="../framapad_to_hdoc" executable="run.bat"/>
28 29
    </target>
    
Jean Vintache's avatar
Jean Vintache committed
30
    <target name="to_hdoc_unix" if="${is_unix}">
31 32 33 34 35 36 37 38 39 40
    	<delete>
            <fileset dir="${eth_in}">
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy todir="${eth_in}">
            <fileset dir="${in}">
                <include name="*.html"/>
            </fileset>
        </copy> 
41 42
        <exec executable="/bin/bash" dir="../framapad_to_hdoc">
            <arg value="../framapad_to_hdoc/run.sh"/>
Jean Vintache's avatar
Jean Vintache committed
43
        </exec>
jcomedouteau's avatar
jcomedouteau committed
44 45
    </target>
    
46
    <target name="to_opale_init">
47 48 49 50
    </target>
    
    <target name="to_opale_unix" if="${is_unix}">
    	<delete>
jcomedouteau's avatar
jcomedouteau committed
51 52 53 54
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
55 56 57
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
Jean Vintache's avatar
Jean Vintache committed
58 59 60
        <exec executable="/bin/bash" dir="../hdoc_to_opale">
            <arg value="../hdoc_to_opale/run.sh"/>
        </exec>
jcomedouteau's avatar
jcomedouteau committed
61 62 63
    </target>
    
    <target name="to_opale_windows" if="${is_windows}">
64 65 66 67 68 69 70 71
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
72
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
73 74 75 76 77 78
    </target>
    
    <target name="to_opale_end">
        <copy todir="${out}">
            <fileset dir="${opa_out}"/>
        </copy>
79 80 81
    </target>
        
    <target name="main">
82 83 84 85
        <delete dir="${out}" failonerror="false"/>
        <mkdir dir="output"/>
        
        <antcall target="to_hdoc_init"/>
Jean Vintache's avatar
Jean Vintache committed
86
        <antcall target="to_hdoc_unix"/>
jcomedouteau's avatar
jcomedouteau committed
87
        <antcall target="to_hdoc_windows"/>
88
        <antcall target="to_opale_init"/>
Jean Vintache's avatar
Jean Vintache committed
89
        <antcall target="to_opale_unix"/>        
90 91
        <antcall target="to_opale_windows"/>
        <antcall target="to_opale_end"/>        
92
    </target>
93
</project>