etherpad_to_opale.ant 2.66 KB
Newer Older
1
2
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
jcomedouteau's avatar
jcomedouteau committed
3
    <property file="etherpad_to_opale.properties"/>    
Jean Vintache's avatar
Jean Vintache committed
4
    <!-- CHECK FOR OS FAMILY -->
jcomedouteau's avatar
jcomedouteau committed
5
6
7
8
9
10
    <condition property="is_windows">
        <os family="windows"/>
    </condition>
    <condition property="is_unix">
        <os family="unix"/>
    </condition>
11

12
    <target name="to_hdoc_init">
Jean Vintache's avatar
Jean Vintache committed
13
14
15
16
17
     
    </target>

    <target name="to_hdoc_windows" if="${is_windows}">
    	<delete>
jcomedouteau's avatar
jcomedouteau committed
18
            <fileset dir="${eth_in}">
19
20
21
                <include name="*.html"/>
            </fileset>
        </delete>
22
23
24
25
        <copy todir="${eth_in}">
            <fileset dir="${in}">
                <include name="*.html"/>
            </fileset>
Jean Vintache's avatar
Jean Vintache committed
26
        </copy> 
27
28
29
        <exec dir="../etherpad_to_hdoc" executable="run.bat"/>
    </target>
    
Jean Vintache's avatar
Jean Vintache committed
30
    <target name="to_hdoc_unix" if="${is_unix}">
Jean Vintache's avatar
Jean Vintache committed
31
32
33
34
35
36
37
38
39
40
    	<delete>
            <fileset dir="${eth_in}">
                <include name="*.html"/>
            </fileset>
        </delete>
        <copy todir="${eth_in}">
            <fileset dir="${in}">
                <include name="*.html"/>
            </fileset>
        </copy> 
Jean Vintache's avatar
Jean Vintache committed
41
42
43
        <exec executable="/bin/bash" dir="../etherpad_to_hdoc">
            <arg value="../etherpad_to_hdoc/run.sh"/>
        </exec>
jcomedouteau's avatar
jcomedouteau committed
44
45
    </target>
    
46
    <target name="to_opale_init">
Jean Vintache's avatar
Jean Vintache committed
47
48
49
50
    </target>
    
    <target name="to_opale_unix" if="${is_unix}">
    	<delete>
jcomedouteau's avatar
jcomedouteau committed
51
52
53
54
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
55
56
57
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
Jean Vintache's avatar
Jean Vintache committed
58
59
60
        <exec executable="/bin/bash" dir="../hdoc_to_opale">
            <arg value="../hdoc_to_opale/run.sh"/>
        </exec>
jcomedouteau's avatar
jcomedouteau committed
61
62
63
    </target>
    
    <target name="to_opale_windows" if="${is_windows}">
Jean Vintache's avatar
Jean Vintache committed
64
65
66
67
68
69
70
71
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
72
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
73
74
75
76
77
78
    </target>
    
    <target name="to_opale_end">
        <copy todir="${out}">
            <fileset dir="${opa_out}"/>
        </copy>
79
80
81
    </target>
        
    <target name="main">
82
83
84
85
        <delete dir="${out}" failonerror="false"/>
        <mkdir dir="output"/>
        
        <antcall target="to_hdoc_init"/>
Jean Vintache's avatar
Jean Vintache committed
86
        <antcall target="to_hdoc_unix"/>
jcomedouteau's avatar
jcomedouteau committed
87
        <antcall target="to_hdoc_windows"/>
88
        <antcall target="to_opale_init"/>
Jean Vintache's avatar
Jean Vintache committed
89
        <antcall target="to_opale_unix"/>        
90
91
        <antcall target="to_opale_windows"/>
        <antcall target="to_opale_end"/>        
92
93
    </target>
</project>