55 <available file="${@DROP@.master.bundle.copy}" type="file"/>
56 </condition>
57 <target name="-@DROP@-copy-bundle"
58 depends="init, -@DROP@-ready"
59 if="@DROP@.master.bundle.copy.exists"
60 unless="@DROP@.ready">
61 <echo message="Copying from ${@DROP@.master.bundle.copy}"/>
62 <dirname property="@DROP@.bundle.dirname" file="${@DROP@.bundle.copy}"/>
63 <mkdir dir="${@DROP@.bundle.dirname}"/>
64 <delete file="${@DROP@.bundle.copy}.temp"/>
65 <delete file="${@DROP@.bundle.copy}"/>
66 <copy file="${@DROP@.master.bundle.copy}" tofile="${@DROP@.bundle.copy}.temp"/>
67 <move file="${@DROP@.bundle.copy}.temp" tofile="${@DROP@.bundle.copy}"/>
68 <property name="@DROP@.master.bundle.found" value="true"/>
69 </target>
70
71 <!-- Determine if the master url download should be used. -->
72 <target name="-@DROP@-url-should-be-used" unless="@DROP@.url.should.be.used">
73 <condition property="@DROP@.url.should.be.used">
74 <and>
75 <http url="${@DROP@.master.bundle.url.base}"/>
76 <not>
77 <isset property="@DROP@.master.bundle.copy.exists"/>
78 </not>
79 </and>
80 </condition>
81 </target>
82
83 <!-- Download bundles from a url. -->
84 <target name="-@DROP@-url-bundle"
85 depends="init, -@DROP@-ready, -@DROP@-url-should-be-used"
86 if="@DROP@.url.should.be.used"
87 unless="@DROP@.ready">
88 <echo message="Downloading from ${@DROP@.master.bundle.url}"/>
89 <dirname property="@DROP@.bundle.dirname" file="${@DROP@.bundle.copy}"/>
90 <mkdir dir="${@DROP@.bundle.dirname}"/>
91 <delete file="${@DROP@.bundle.copy}.temp"/>
92 <delete file="${@DROP@.bundle.copy}"/>
93 <get src="${@DROP@.master.bundle.url}" dest="${@DROP@.bundle.copy}.temp"/>
94 <move file="${@DROP@.bundle.copy}.temp" tofile="${@DROP@.bundle.copy}"/>
95 <property name="@DROP@.master.bundle.found" value="true"/>
96 </target>
97
98 <!-- Fill in the drop zones, but just when needed. -->
99 <target name="@DROP@-update"
100 depends="init,
101 -@DROP@-copy-bundle,
102 -@DROP@-url-bundle,
103 -@DROP@-ready"
104 if="@DROP@.master.bundle.found"
105 unless="@DROP@.ready">
106 <delete dir="${@DROP@.root.dir}"/>
107 <delete dir="${@DROP@.root.dir}-temp"/>
108 <mkdir dir="${@DROP@.root.dir}-temp"/>
109 <unzip src="${@DROP@.bundle.copy}" dest="${@DROP@.root.dir}-temp"/>
110 <move file="${@DROP@.root.dir}-temp" tofile="${@DROP@.root.dir}"/>
111 <touch>
112 <fileset dir="${@DROP@.root.dir}"/>
113 </touch>
114 <condition property="patch.utility" value="gpatch" else="patch">
115 <os name="SunOS"/>
116 </condition>
117 <apply executable="${patch.utility}"
118 dir="${@DROP@.root.dir}"
119 parallel="false"
120 failonerror="true"
121 verbose="true">
122 <arg value="-l"/>
123 <arg value="-p0"/>
124 <arg value="-i"/>
125 <filelist dir="${patches.dir}/@DROP@" files="${@DROP@.patch.list}"/>
126 </apply>
127 <echo file="${@DROP@.root.dir}/PATCHED"
128 message="Patches have been applied."/>
|
55 <available file="${@DROP@.master.bundle.copy}" type="file"/>
56 </condition>
57 <target name="-@DROP@-copy-bundle"
58 depends="init, -@DROP@-ready"
59 if="@DROP@.master.bundle.copy.exists"
60 unless="@DROP@.ready">
61 <echo message="Copying from ${@DROP@.master.bundle.copy}"/>
62 <dirname property="@DROP@.bundle.dirname" file="${@DROP@.bundle.copy}"/>
63 <mkdir dir="${@DROP@.bundle.dirname}"/>
64 <delete file="${@DROP@.bundle.copy}.temp"/>
65 <delete file="${@DROP@.bundle.copy}"/>
66 <copy file="${@DROP@.master.bundle.copy}" tofile="${@DROP@.bundle.copy}.temp"/>
67 <move file="${@DROP@.bundle.copy}.temp" tofile="${@DROP@.bundle.copy}"/>
68 <property name="@DROP@.master.bundle.found" value="true"/>
69 </target>
70
71 <!-- Determine if the master url download should be used. -->
72 <target name="-@DROP@-url-should-be-used" unless="@DROP@.url.should.be.used">
73 <condition property="@DROP@.url.should.be.used">
74 <and>
75 <not>
76 <isset property="@DROP@.master.bundle.copy.exists"/>
77 </not>
78 </and>
79 </condition>
80 </target>
81
82 <!-- Download bundles from a url. -->
83 <target name="-@DROP@-url-bundle"
84 depends="init, -@DROP@-ready, -@DROP@-url-should-be-used"
85 if="@DROP@.url.should.be.used"
86 unless="@DROP@.ready">
87 <echo message="Downloading from ${@DROP@.master.bundle.url}"/>
88 <dirname property="@DROP@.bundle.dirname" file="${@DROP@.bundle.copy}"/>
89 <mkdir dir="${@DROP@.bundle.dirname}"/>
90 <delete file="${@DROP@.bundle.copy}.temp"/>
91 <delete file="${@DROP@.bundle.copy}"/>
92 <get src="${@DROP@.master.bundle.url}" dest="${@DROP@.bundle.copy}.temp"/>
93 <move file="${@DROP@.bundle.copy}.temp" tofile="${@DROP@.bundle.copy}"/>
94 <property name="@DROP@.master.bundle.found" value="true"/>
95 </target>
96
97 <!-- Fill in the drop zones, but just when needed. -->
98 <target name="@DROP@-update"
99 depends="init,
100 -@DROP@-copy-bundle,
101 -@DROP@-url-bundle,
102 -@DROP@-ready"
103 if="@DROP@.master.bundle.found"
104 unless="@DROP@.ready">
105 <delete dir="${@DROP@.root.dir}"/>
106 <delete dir="${@DROP@.root.dir}-temp"/>
107 <mkdir dir="${@DROP@.root.dir}-temp"/>
108 <checksum file="${@DROP@.bundle.copy}"
109 property="@DROP@.bundle.md5.checksum.is"/>
110 <condition property="@DROP@.bundle.md5.checksum.good">
111 <equals arg1="${@DROP@.bundle.md5.checksum}"
112 arg2="${@DROP@.bundle.md5.checksum.is}"/>
113 </condition>
114 <fail unless="@DROP@.bundle.md5.checksum.good">
115 Checksum on file ${@DROP@.bundle.copy} is
116 ${@DROP@.bundle.md5.checksum.is}, not ${@DROP@.bundle.md5.checksum}
117 </fail>
118 <unzip src="${@DROP@.bundle.copy}" dest="${@DROP@.root.dir}-temp"/>
119 <move file="${@DROP@.root.dir}-temp" tofile="${@DROP@.root.dir}"/>
120 <touch>
121 <fileset dir="${@DROP@.root.dir}"/>
122 </touch>
123 <condition property="patch.utility" value="gpatch" else="patch">
124 <os name="SunOS"/>
125 </condition>
126 <apply executable="${patch.utility}"
127 dir="${@DROP@.root.dir}"
128 parallel="false"
129 failonerror="true"
130 verbose="true">
131 <arg value="-l"/>
132 <arg value="-p0"/>
133 <arg value="-i"/>
134 <filelist dir="${patches.dir}/@DROP@" files="${@DROP@.patch.list}"/>
135 </apply>
136 <echo file="${@DROP@.root.dir}/PATCHED"
137 message="Patches have been applied."/>
|