etherpad_to_opale.ant 2.66 KB
Newer Older
Etienne Chognard's avatar
Etienne Chognard committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
    <property file="etherpad_to_opale.properties"/>    
    <!-- CHECK FOR OS FAMILY -->
    <condition property="is_windows">
        <os family="windows"/>
    </condition>
    <condition property="is_unix">
        <os family="unix"/>
    </condition>

    <target name="to_hdoc_init">
     
    </target>

    <target name="to_hdoc_windows" if="${is_windows}">
    	<delete>
            <fileset dir="${eth_in}">
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy todir="${eth_in}">
            <fileset dir="${in}">
                <include name="*.html"/>
            </fileset>
        </copy> 
        <exec dir="../etherpad_to_hdoc" executable="run.bat"/>
    </target>
    
    <target name="to_hdoc_unix" if="${is_unix}">
    	<delete>
            <fileset dir="${eth_in}">
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy todir="${eth_in}">
            <fileset dir="${in}">
                <include name="*.html"/>
            </fileset>
        </copy> 
        <exec executable="/bin/bash" dir="../etherpad_to_hdoc">
            <arg value="../etherpad_to_hdoc/run.sh"/>
        </exec>
    </target>
    
    <target name="to_opale_init">
    </target>
    
    <target name="to_opale_unix" if="${is_unix}">
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
        <exec executable="/bin/bash" dir="../hdoc_to_opale">
            <arg value="../hdoc_to_opale/run.sh"/>
        </exec>
    </target>
    
    <target name="to_opale_windows" if="${is_windows}">
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
    </target>
    
    <target name="to_opale_end">
        <copy todir="${out}">
            <fileset dir="${opa_out}"/>
        </copy>
    </target>
        
    <target name="main">
        <delete dir="${out}" failonerror="false"/>
        <mkdir dir="output"/>
        
        <antcall target="to_hdoc_init"/>
        <antcall target="to_hdoc_unix"/>
        <antcall target="to_hdoc_windows"/>
        <antcall target="to_opale_init"/>
        <antcall target="to_opale_unix"/>        
        <antcall target="to_opale_windows"/>
        <antcall target="to_opale_end"/>        
    </target>
</project>