Browse Source

Get ant to output a warning if /etc/ant.conf

has modified ANT_HOME



git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@446773 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 19 years ago
parent
commit
dee4d94b11
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/script/ant

+ 7
- 0
src/script/ant View File

@@ -44,11 +44,18 @@ 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
. /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


Loading…
Cancel
Save