etherpad_to_lexique.ant 2.17 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
3
    <property file="etherpad_to_lexique.properties"/>    
Jean Vintache's avatar
Jean Vintache committed
4
    <!-- CHECK FOR OS FAMILY -->
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    <condition property="is_windows">
        <os family="windows"/>
    </condition>
    <condition property="is_unix">
        <os family="unix"/>
    </condition>

    <target name="to_hdoc_windows" if="${is_windows}">
        <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.bat"/>
    </target>
    
Jean Vintache's avatar
Jean Vintache committed
22
    <target name="to_hdoc_unix" if="${is_unix}">
23 24 25 26 27 28
        <delete>
            <fileset dir="${eth_in}">
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy file="input/pad.html" todir="${eth_in}"/>
Jean Vintache's avatar
Jean Vintache committed
29
        <exec executable="/bin/bash" dir="../etherpad_to_hdoc">
Jean Vintache's avatar
Jean Vintache committed
30
            <arg value="../etherpad_to_hdoc/run.sh"/>
Jean Vintache's avatar
Jean Vintache committed
31
        </exec>
32 33
    </target>
    
Jean Vintache's avatar
Jean Vintache committed
34
    <target name="to_lex_unix" if="${is_unix}">
35
        <delete>
36
            <fileset dir="${lex_in}">
37 38 39
                <include name="*.hdoc"/>
            </fileset>
        </delete>
Jean Vintache's avatar
Jean Vintache committed
40
        <copy file="${eth_out}/pad.hdoc" todir="${lex_in}"/>
Jean Vintache's avatar
Jean Vintache committed
41
        <exec executable="/bin/bash" dir="../hdoc_to_lexique">
Jean Vintache's avatar
Jean Vintache committed
42 43
            <arg value="../hdoc_to_lexique/run.sh"/>
        </exec>
44
        <copy file="${lex_out}/*.scar" todir="output"/>        
45 46
    </target>
    
47
    <target name="to_lex_windows" if="${is_windows}">
48
        <delete>
49
            <fileset dir="${lex_in}">
50 51 52
                <include name="*.hdoc"/>
            </fileset>
        </delete>
Jean Vintache's avatar
Jean Vintache committed
53
        <copy file="${eth_out}/pad.hdoc" todir="${lex_in}"/>
54
        <exec dir="../hdoc_to_lexique" executable="run.bat"/>
55
        <mkdir dir="output"/>
56 57 58
        <copy todir="output">
            <fileset dir="${lex_out}"/>
        </copy>
59 60 61
    </target>
        
    <target name="main">
Jean Vintache's avatar
Jean Vintache committed
62
        <antcall target="to_hdoc_unix"/>
63
        <antcall target="to_hdoc_windows"/>
Jean Vintache's avatar
Jean Vintache committed
64
        <antcall target="to_lex_unix"/>        
65
        <antcall target="to_lex_windows"/>        
66 67 68
    </target>
    
</project>