etherpad_to_lexique.ant 2.1 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
30
31
        <exec executable="/bin/bash" dir="../etherpad_to_hdoc">
        <arg value="../etherpad_to_hdoc/run.sh"/>
        </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}"/>
41
42
        <exec dir="../hdoc_to_lexique" executable="run.sh"/>
        <copy file="${lex_out}/*.scar" todir="output"/>        
43
44
    </target>
    
45
    <target name="to_lex_windows" if="${is_windows}">
46
        <delete>
47
            <fileset dir="${lex_in}">
48
49
50
                <include name="*.hdoc"/>
            </fileset>
        </delete>
Jean Vintache's avatar
Jean Vintache committed
51
        <copy file="${eth_out}/pad.hdoc" todir="${lex_in}"/>
52
        <exec dir="../hdoc_to_lexique" executable="run.bat"/>
53
        <mkdir dir="output"/>
54
55
56
        <copy todir="output">
            <fileset dir="${lex_out}"/>
        </copy>
57
58
59
    </target>
        
    <target name="main">
Jean Vintache's avatar
Jean Vintache committed
60
        <antcall target="to_hdoc_unix"/>
61
        <antcall target="to_hdoc_windows"/>
Jean Vintache's avatar
Jean Vintache committed
62
        <antcall target="to_lex_unix"/>        
63
        <antcall target="to_lex_windows"/>        
64
65
66
    </target>
    
</project>