etherpad_to_opale.ant 2.53 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> 
jcomedouteau's avatar
jcomedouteau committed
41
42
43
        <exec dir="../etherpad_to_hdoc" executable="run.sh"/>
    </target>
    
44
    <target name="to_opale_init">
Jean Vintache's avatar
Jean Vintache committed
45
46
47
48
    </target>
    
    <target name="to_opale_unix" if="${is_unix}">
    	<delete>
jcomedouteau's avatar
jcomedouteau committed
49
50
51
52
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
53
54
55
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
jcomedouteau's avatar
jcomedouteau committed
56
57
58
59
        <exec dir="../hdoc_to_opale" executable="run.sh"/>
    </target>
    
    <target name="to_opale_windows" if="${is_windows}">
Jean Vintache's avatar
Jean Vintache committed
60
61
62
63
64
65
66
67
    	<delete>
            <fileset dir="${opa_in}">
                <include name="*.hdoc"/>
            </fileset>
        </delete>
        <copy todir="${opa_in}">
            <fileset dir="${eth_out}"/>
        </copy>
68
        <exec dir="../hdoc_to_opale" executable="run.bat"/>
69
70
71
72
73
74
    </target>
    
    <target name="to_opale_end">
        <copy todir="${out}">
            <fileset dir="${opa_out}"/>
        </copy>
75
76
77
    </target>
        
    <target name="main">
78
79
80
81
        <delete dir="${out}" failonerror="false"/>
        <mkdir dir="output"/>
        
        <antcall target="to_hdoc_init"/>
Jean Vintache's avatar
Jean Vintache committed
82
        <antcall target="to_hdoc_unix"/>
jcomedouteau's avatar
jcomedouteau committed
83
        <antcall target="to_hdoc_windows"/>
84
        <antcall target="to_opale_init"/>
Jean Vintache's avatar
Jean Vintache committed
85
        <antcall target="to_opale_unix"/>        
86
87
        <antcall target="to_opale_windows"/>
        <antcall target="to_opale_end"/>        
88
89
    </target>
</project>