etherpad_to_optim.ant 2.02 KB
Newer Older
jcomedouteau's avatar
jcomedouteau committed
1
2
3
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
    <property file="etherpad_to_optim.properties"/>    
    <!-- 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>
    
    <target name="to_optim_sh" if="${is_unix}">
        <delete>
            <fileset dir="${opti_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy file="${eth_out}/output.hdoc" todir="${opti_in}"/>
        <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>
        <copy file="${eth_out}/output.hdoc" todir="${opti_in}"/>
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
        <mkdir dir="output"/>
        <copy file="${opti_out}/*.scar" todir="output"/>
    </target>
        
    <target name="main">
        <antcall target="to_hdoc_sh"/>
        <antcall target="to_hdoc_windows"/>
        <antcall target="to_optim_sh"/>        
        <antcall target="to_optim_windows"/>        
    </target>
    
</project>