mizdebsk / rpms / ant

Forked from rpms/ant 5 years ago
Clone
vadimn 32cc133
--- apache-ant-1.6.5/src/script/ant.original	2005-10-27 17:06:55.000000000 -0400
vadimn 32cc133
+++ apache-ant-1.6.5/src/script/ant	2005-10-27 17:08:45.000000000 -0400
vadimn 32cc133
@@ -150,6 +150,28 @@
vadimn 32cc133
 # variable
vadimn 32cc133
 if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
vadimn 32cc133
   LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
vadimn 32cc133
+
vadimn 32cc133
+  # If no optional jars have been specified then build the default list
vadimn 32cc133
+  if [ -z "$OPT_JAR_LIST" ] ; then
vadimn 32cc133
+    for file in /etc/ant.d/*; do
vadimn 32cc133
+      if [ -f "$file" ]; then
vadimn 32cc133
+        case "$file" in
vadimn 32cc133
+        *~) ;;
vadimn 32cc133
+        *#*) ;;
vadimn 32cc133
+        *.rpmsave) ;;
vadimn 32cc133
+        *.rpmnew) ;;
vadimn 32cc133
+        *)
vadimn 32cc133
+          for dep in `cat "$file"`; do
vadimn 32cc133
+            case "$OPT_JAR_LIST" in
vadimn 32cc133
+            *"$dep"*) ;;
vadimn 32cc133
+            *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
vadimn 32cc133
+            esac
vadimn 32cc133
+          done
vadimn 32cc133
+        esac
vadimn 32cc133
+      fi
vadimn 32cc133
+    done
vadimn 32cc133
+  fi
vadimn 32cc133
+
vadimn 32cc133
   # If the user requested to try to add some other jars to the classpath
vadimn 32cc133
   if [ -n "$OPT_JAR_LIST" ] ; then
vadimn 32cc133
     _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"