etherpad_to_optim.ant 2.02 KB
Newer Older
jcomedouteau's avatar
jcomedouteau committed
1
2
3
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
    <property file="etherpad_to_optim.properties"/>    
Jean Vintache's avatar
Jean Vintache committed
4
    <!-- CHECK FOR OS FAMILY -->
jcomedouteau's avatar
jcomedouteau committed
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}">
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_optim_unix" if="${is_unix}">
jcomedouteau's avatar
jcomedouteau committed
33
34
35
36
37
        <delete>
            <fileset dir="${opti_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
38
        <copy file="${eth_out}/pad.hdoc" todir="${opti_in}"/>
jcomedouteau's avatar
jcomedouteau committed
39
40
41
42
43
44
45
46
47
48
        <exec dir="../hdoc_to_optim" executable="run.sh"/>
        <copy file="${opti_out}/*.scar" todir="output"/>        
    </target>
    
    <target name="to_optim_windows" if="${is_windows}">
        <delete>
            <fileset dir="${opti_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
49
        <copy file="${eth_out}/pad.hdoc" todir="${opti_in}"/>
50
        <exec dir="../hdoc_to_optim" executable="run.bat"/>
jcomedouteau's avatar
jcomedouteau committed
51
        <mkdir dir="output"/>
52
        <copy file="${opti_out}/result.scar" todir="output"/>
jcomedouteau's avatar
jcomedouteau committed
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_optim_unix"/>        
jcomedouteau's avatar
jcomedouteau committed
59
60
61
62
        <antcall target="to_optim_windows"/>        
    </target>
    
</project>