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
    <property file="etherpad_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

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