1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
|
3 |
<project name="DiffTool" default="init" basedir="."> |
4 |
|
5 |
<description> |
6 |
Diff Ant script |
7 |
</description> |
8 |
|
9 |
|
10 |
<!-- set global properties for this build --> |
11 |
|
12 |
<!-- Get diff properties (general) --> |
13 |
<property file="diff.properties" /> |
14 |
|
15 |
<fail unless="dir.left" message="bad configuration for the left folder [dir.left] in diff.properties !" /> |
16 |
<fail unless="dir.right" message="bad configuration for the left folder [dir.right] in diff.properties !" /> |
17 |
|
18 |
<fail unless="merge.cmd" message="bad configuration for the merge command [merge.cmd] in diff.properties !" /> |
19 |
|
20 |
|
21 |
|
22 |
|
23 |
<!-- init timestamp --> |
24 |
<target name="init"> |
25 |
|
26 |
<tstamp> |
27 |
<format property="build.timestamp" pattern="dd_MM_yyyy__HH-mm-ss" /> |
28 |
<format property="build.date" pattern="dd/MM/yyyy HH:mm:ss" /> |
29 |
</tstamp> |
30 |
|
31 |
<echo>-------------------------------------------------------------------------------</echo> |
32 |
<echo> Diff Ant Script</echo> |
33 |
<echo>-------------------------------------------------------------------------------</echo> |
34 |
<echo> Left side : ${dir.left} </echo> |
35 |
<echo> Right side : ${dir.right} </echo> |
36 |
<echo>-------------------------------------------------------------------------------</echo> |
37 |
<echo> merge command : ${merge.cmd} </echo> |
38 |
<echo>-------------------------------------------------------------------------------</echo> |
39 |
<echo message="now : ${build.timestamp}" /> |
40 |
<echo>-------------------------------------------------------------------------------</echo> |
41 |
|
42 |
</target> |
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
<!-- target compare : compare left and right folders using the merge tool --> |
50 |
<target name="compare"> |
51 |
|
52 |
<echo message="compare : ${dir.left} with ${dir.right}"/> |
53 |
|
54 |
<exec executable="${merge.cmd}" failonerror="false"> |
55 |
<arg value="${dir.left}"/> |
56 |
<arg value="${dir.right}"/> |
57 |
</exec> |
58 |
|
59 |
<echo message="compare : done."/> |
60 |
|
61 |
</target> |
62 |
|
63 |
|
64 |
|
65 |
<!-- target openLeft : open left folder --> |
66 |
<target name="openLeft"> |
67 |
|
68 |
<echo message="openLeft : ${dir.left}"/> |
69 |
|
70 |
<exec executable="${open.cmd}" failonerror="false"> |
71 |
<arg value="${dir.left}"/> |
72 |
</exec> |
73 |
|
74 |
<echo message="openLeft : done."/> |
75 |
|
76 |
</target> |
77 |
|
78 |
|
79 |
|
80 |
|
81 |
<!-- target openLeft : open left folder --> |
82 |
<target name="openRight"> |
83 |
|
84 |
<echo message="openRight : ${dir.right}"/> |
85 |
|
86 |
<exec executable="${open.cmd}" failonerror="false"> |
87 |
<arg value="${dir.right}"/> |
88 |
</exec> |
89 |
|
90 |
<echo message="openRight : done."/> |
91 |
|
92 |
</target> |
93 |
|
94 |
|
95 |
</project> |