Author: mbenson
Date: Fri Jul 11 15:42:53 2008
New Revision: 676094

URL: http://svn.apache.org/viewvc?rev=676094&view=rev
Log:
make install-ant a little more robust

Modified:
    ant/ivy/core/trunk/build.xml

Modified: ant/ivy/core/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/build.xml?rev=676094&r1=676093&r2=676094&view=diff
==============================================================================
--- ant/ivy/core/trunk/build.xml (original)
+++ ant/ivy/core/trunk/build.xml Fri Jul 11 15:42:53 2008
@@ -55,9 +55,13 @@
         <copy file="${artifacts.build.dir}/jars/${final.name}" 
tofile="${ivy.jar.file}" />
     </target>
 
-    <target name="install-ant" depends="init-ivy-home, jar" 
+    <target name="install-ant" depends="init-ivy-home, jar"
        description="build Ivy and install it in Ant home lib">
-        <copy file="${artifacts.build.dir}/jars/${final.name}" 
tofile="${env.ANT_HOME}/lib/ivy.jar" />
+        <condition property="ant.home" value="${env.ANT_HOME}">
+          <isset property="env.ANT_HOME" />
+        </condition>
+        <fail unless="ant.home" message="ANT_HOME environment variable or 
ant.home property required" />
+        <copy file="${artifacts.build.dir}/jars/${final.name}" 
tofile="${ant.home}/lib/ivy.jar" />
     </target>
 
     <!-- =================================================================


Reply via email to