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

jcomedouteau's avatar
jcomedouteau committed
13
    <target name="to_hdoc_windows" if="${is_windows}">
14
        <delete>
jcomedouteau's avatar
jcomedouteau committed
15
            <fileset dir="${eth_in}">
16 17 18
                <include name="*.html"/>
            </fileset>
        </delete>
jcomedouteau's avatar
jcomedouteau committed
19
        <copy file="input/pad.html" todir="${eth_in}"/>
20 21 22
        <exec dir="../etherpad_to_hdoc" executable="run.bat"/>
    </target>
    
jcomedouteau's avatar
jcomedouteau committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    <target name="to_hdoc_sh" if="${is_unix}">
        <delete>
            <fileset dir="${eth_in}">
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy file="input/pad.html" todir="${eth_in}"/>
        <exec dir="../etherpad_to_hdoc" executable="run.sh"/>
    </target>
    
    <target name="to_opale_sh" if="${is_unix}">
        <delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy file="${eth_out}/output.hdoc" todir="${opa_in}"/>
        <exec dir="../hdoc_to_opale" executable="run.sh"/>
        <copy file="${opa_out}/*.scar" todir="output"/>        
    </target>
    
    <target name="to_opale_windows" if="${is_windows}">
45
        <delete>
jcomedouteau's avatar
jcomedouteau committed
46
            <fileset dir="${opa_in}">
47 48 49
                <include name="*.hdoc"/>
            </fileset>
        </delete>
jcomedouteau's avatar
jcomedouteau committed
50
        <copy file="${eth_out}/output.hdoc" todir="${opa_in}"/>
51
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
52 53
        <mkdir dir="output"/>
        <copy file="${opa_out}/*.scar" todir="output"/>
54 55 56
    </target>
        
    <target name="main">
jcomedouteau's avatar
jcomedouteau committed
57 58 59 60
        <antcall target="to_hdoc_sh"/>
        <antcall target="to_hdoc_windows"/>
        <antcall target="to_opale_sh"/>        
        <antcall target="to_opale_windows"/>        
61 62 63
    </target>
    
</project>