etherpad_to_optim.ant 2.16 KB
Newer Older
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 -->
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_optim_unix" if="${is_unix}">
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>
44
        <copy file="${opti_out}/result.scar" todir="output"/>        
45 46 47 48 49 50 51 52
    </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"/>
55
        <mkdir dir="output"/>
56
        <copy file="${opti_out}/result.scar" todir="output"/>
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_optim_unix"/>        
63 64 65 66
        <antcall target="to_optim_windows"/>        
    </target>
    
</project>