etherpad_to_optim.ant 2.16 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
        <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>
jcomedouteau's avatar
jcomedouteau committed
32
33
    </target>
    
Jean Vintache's avatar
Jean Vintache committed
34
    <target name="to_optim_unix" if="${is_unix}">
jcomedouteau's avatar
jcomedouteau committed
35
36
37
38
39
        <delete>
            <fileset dir="${opti_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
40
        <copy file="${eth_out}/pad.hdoc" todir="${opti_in}"/>
Jean Vintache's avatar
Jean Vintache committed
41
42
43
        <exec executable="/bin/bash" dir="../hdoc_to_optim">
            <arg value="../hdoc_to_optim/run.sh"/>
        </exec>
jcomedouteau's avatar
jcomedouteau committed
44
45
46
47
48
49
50
51
52
        <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>
53
        <copy file="${eth_out}/pad.hdoc" todir="${opti_in}"/>
54
        <exec dir="../hdoc_to_optim" executable="run.bat"/>
jcomedouteau's avatar
jcomedouteau committed
55
        <mkdir dir="output"/>
56
        <copy file="${opti_out}/result.scar" todir="output"/>
jcomedouteau's avatar
jcomedouteau committed
57
58
59
    </target>
        
    <target name="main">
Jean Vintache's avatar
Jean Vintache committed
60
        <antcall target="to_hdoc_unix"/>
jcomedouteau's avatar
jcomedouteau committed
61
        <antcall target="to_hdoc_windows"/>
Jean Vintache's avatar
Jean Vintache committed
62
        <antcall target="to_optim_unix"/>        
jcomedouteau's avatar
jcomedouteau committed
63
64
65
66
        <antcall target="to_optim_windows"/>        
    </target>
    
</project>