ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r818144 - /ant/core/trunk/docs/manual/CoreTasks/get.html
Date Wed, 23 Sep 2009 15:40:56 GMT
Author: bodewig
Date: Wed Sep 23 15:40:55 2009
New Revision: 818144

URL: http://svn.apache.org/viewvc?rev=818144&view=rev
Log:
use a single get task in macro

Modified:
    ant/core/trunk/docs/manual/CoreTasks/get.html

Modified: ant/core/trunk/docs/manual/CoreTasks/get.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/get.html?rev=818144&r1=818143&r2=818144&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/get.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/get.html Wed Sep 23 15:40:55 2009
@@ -176,9 +176,17 @@
   <macrodef name="get-and-checksum">
     <attribute name="url"/>
     <attribute name="dest"/>
-    <sequential>
-      <get src="@{url}" dest="@{dest}"/>
-      <get src="@{url}.sha1" dest="@{dest}.sha"/>
+    <sequential>
+      <local name="destdir"/>
+      <dirname property="destdir" file="@{dest}"/>
+      <get dest="${destdir}">
+        <url url="@{url}"/>
+        <url url="@{url}.sha1"/>
+        <firstmatchmapper>
+          <globmapper from="@{url}.sha1" to="@{dest}.sha"/>
+          <globmapper from="@{url}" to="@{dest}"/>
+        </firstmatchmapper>
+      </get>
       <local name="checksum.matches"/>
       <local name="checksum.matches.fail"/>
       <checksum file="@{dest}" algorithm="sha" fileext=".sha"



Mime
View raw message