ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel L. Rall" <...@finemaltcoding.com>
Subject PATCH: buildAnt and buildAnt.xml
Date Fri, 21 Jul 2000 01:44:20 GMT
Here's a slightly better version of the same patch which references the
ant wrapper script explicitly, removing the need to have the script in
your path.   The corresponding XML file has also been patched to take
the deprecation of chmod's "src" attribute in favor of "file" into
account.

Index: buildAnt.xml
===================================================================
RCS file: /home/cvspublic/jakarta-ant/buildAnt.xml,v
retrieving revision 1.1
diff -u -u -r1.1 buildAnt.xml
--- buildAnt.xml	2000/04/27 20:26:10	1.1
+++ buildAnt.xml	2000/07/21 01:42:38
@@ -72,9 +72,9 @@
   <target name="install">
     <copydir src="${buildAnt.uploads}" dest="${buildAnt.server}"
              includes="${buildAnt.name}-${DSTAMP}.*"/>
-    <chmod   src="${buildAnt.server}/${buildAnt.name}-${DSTAMP}.*"
+    <chmod   file="${buildAnt.server}/${buildAnt.name}-${DSTAMP}.*"
              perm="g+w"/>
-    <chmod   src="${buildAnt.server}/${buildAnt.name}-${DSTAMP}.*"
+    <chmod   file="${buildAnt.server}/${buildAnt.name}-${DSTAMP}.*"
              perm="o+r"/>
   </target>
 
Index: buildAnt
===================================================================
RCS file: /home/cvspublic/jakarta-ant/buildAnt,v
retrieving revision 1.1
diff -u -u -r1.1 buildAnt
--- buildAnt	2000/04/27 20:26:10	1.1
+++ buildAnt	2000/07/21 01:42:39
@@ -16,7 +16,6 @@
 # - Ant 3.1 binary distribution installed
 # - ANT_HOME points at this distribution directory (you can set it
 #   in ~/.antrc)
-# - The "ant" script in $ANT_HOME/bin is accessible on your PATH
 # - Java API for XML Parsing (JAXP) 1.0 reference implementation
installed
 # - JAXP_HOME points at this distribution directory (you can set it
 #   in ~/.antrc)
@@ -25,9 +24,33 @@
 # - To execute the "install" target, you must be running on the Jakarta
 #   server, as part of group "jakarta".
 #
-# Author:	Craig R. McClanahan
-# Version:	$Revision: 1.1 $ $Date: 2000/04/27 20:26:10 $
+# Authors:	Craig R. McClanahan
+#         	Daniel Rall <dlr@finemaltcoding.com>
+# Version:	$Id: $
 #
-----------------------------------------------------------------------------
 
-. ~/.antrc
-ant -buildfile buildAnt.xml -Djaxp.home=$JAXP_HOME "$@"
+# Get any user-specific Ant configuration.
+ANT_RC=~/.antrc
+if [ -r ${ANT_RC} ]; then . ${ANT_RC}; fi
+
+# Checks for the existance of the specified environment variables.  If
one of 
+# the listed variables is not found, exits with error message and
status.
+function check_env_vars()
+{
+    failed=''
+    for var in ${@}; do
+        var="\$${var}"
+        if [ -z "`eval echo -n ${var}`" ]; then
+            echo "$0: set your ${var} environment variable"
+            failed='t'
+        fi
+    done
+    if [ ${failed} ]; then exit 1; fi
+}
+
+# Assure that the environment is setup properly.
+check_env_vars JAXP_HOME ANT_HOME
+
+# Update and build Ant.
+${ANT_HOME}/bin/ant -buildfile buildAnt.xml -Djaxp.home=${JAXP_HOME}
"${@}"
+exit 0

-- 

Daniel Rall <dlr@finemaltcoding.com>

Mime
View raw message