etherpad_to_lexique.ant 2.04 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"/>    
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
    <!-- CHECK FOR WINDOWS FAMILY OS -->
    <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>
    
    <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>
    
33
    <target name="to_lex_sh" if="${is_unix}">
34
        <delete>
35
            <fileset dir="${lex_in}">
36
37
38
                <include name="*.hdoc"/>
            </fileset>
        </delete>
39
40
41
        <copy file="${eth_out}/output.hdoc" todir="${lex_in}"/>
        <exec dir="../hdoc_to_lexique" executable="run.sh"/>
        <copy file="${lex_out}/*.scar" todir="output"/>        
42
43
    </target>
    
44
    <target name="to_lex_windows" if="${is_windows}">
45
        <delete>
46
            <fileset dir="${lex_in}">
47
48
49
                <include name="*.hdoc"/>
            </fileset>
        </delete>
50
51
        <copy file="${eth_out}/output.hdoc" todir="${lex_in}"/>
        <exec dir="../hdoc_to_lexique" executable="run.bat"/>
52
        <mkdir dir="output"/>
53
54
55
        <copy todir="output">
            <fileset dir="${lex_out}"/>
        </copy>
56
57
58
59
60
    </target>
        
    <target name="main">
        <antcall target="to_hdoc_sh"/>
        <antcall target="to_hdoc_windows"/>
61
62
        <antcall target="to_lex_sh"/>        
        <antcall target="to_lex_windows"/>        
63
64
65
    </target>
    
</project>