From 2a225a1ba2671b8a9ea837ea0791fb227987c2f0 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 27 Feb 2004 15:40:34 +0000 Subject: [PATCH] More tweaks to the RPM specific section, submitted by Randy Watler git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276170 13f79535-47bb-0310-9956-ffa450edef68 --- src/script/ant | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/script/ant b/src/script/ant index 951b337a4..f00124342 100644 --- a/src/script/ant +++ b/src/script/ant @@ -182,12 +182,14 @@ if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then # # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour # with ant-found jars first and user CLASSPATH after - if [ -n "$CLASSPATH" -a -n "$CLASSPATH_OVERRIDE" ] ; then - # prepend local class path with class path override - if [ -z "$LOCALCLASSPATH" ] ; then - LOCALCLASSPATH="$CLASSPATH" - else - LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH" + if [ -n "$CLASSPATH" ] ; then + # merge local and specified classpath + if [ -z "$LOCALCLASSPATH" ] ; then + LOCALCLASSPATH="$CLASSPATH" + elif [ -n "$CLASSPATH_OVERRIDE" ] ; then + LOCALCLASSPATH="$CLASSPATH:$LOCALCLASSPATH" + else + LOCALCLASSPATH="$LOCALCLASSPATH:$CLASSPATH" fi # remove class path from launcher -lib option