summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorPeter Reilly <peterreilly@apache.org>2006-10-10 21:45:45 +0000
committerPeter Reilly <peterreilly@apache.org>2006-10-10 21:45:45 +0000
commit6e6999de17bfc652a774caefaa3a09abaf8b7ebe (patch)
treed28015ed6f555911def462f1ac79b6ee40d2c2f7 /src/script
parent765bd26ad705bc14b48624d5313a015fd0734eac (diff)
downloadant-6e6999de17bfc652a774caefaa3a09abaf8b7ebe.tar.gz
1) modify ant script to *NOT* . include /etc/ant.conf
if ANT_HOME variable is set. 2) apply jpackage patch to ant script 3) modify manual to include the change in behaviour to ANT_HOME and jpackage git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@462590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/script')
-rw-r--r--src/script/ant32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/script/ant b/src/script/ant
index bad19c05d..eae54a7f2 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -44,18 +44,11 @@ if $no_config ; then
rpm_mode=false
usejikes=$use_jikes_default
else
- orig_ant_home=$ANT_HOME
- # load system-wide ant configuration
- if [ -f "/etc/ant.conf" ] ; then
+ # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
+ if [ -z "$ANT_HOME" -a -f "/etc/ant.conf" ] ; then
. /etc/ant.conf
fi
- # Normally users do not expect that /etc/ant.conf will override ANT_HOME
- if [ -n "$orig_ant_home" -a "$orig_ant_home" != "$ANT_HOME" ] ; then
- echo "Warning: ANT_HOME has been overridden by /etc/ant.conf from $orig_ant_home to $ANT_HOME"
- echo " Use ant -noconfig if this is not desired."
- fi
-
# load user ant configuration
if [ -f "$HOME/.ant/ant.conf" ] ; then
. $HOME/.ant/ant.conf
@@ -168,6 +161,27 @@ if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
fi
fi
+ # If no optional jars have been specified then build the default list
+ if [ -z "$OPT_JAR_LIST" ] ; then
+ for file in /etc/ant.d/*; do
+ if [ -f "$file" ]; then
+ case "$file" in
+ *~) ;;
+ *#*) ;;
+ *.rpmsave) ;;
+ *.rpmnew) ;;
+ *)
+ for dep in `cat "$file"`; do
+ case "$OPT_JAR_LIST" in
+ *"$dep"*) ;;
+ *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
+ esac
+ done
+ esac
+ fi
+ done
+ fi
+
# Explicitly add javac path to classpath, assume JAVA_HOME set
# properly in rpm mode
if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then