From 761924cb18bc164abca39298b8cbbcee0b4f884d Mon Sep 17 00:00:00 2001 From: rjung Date: Thu, 23 Jun 2011 11:27:57 +0000 Subject: [PATCH] Remove unnecessary variable BASEDIR from scripts. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1138835 13f79535-47bb-0310-9956-ffa450edef68 --- bin/catalina.bat | 1 - bin/catalina.sh | 2 -- bin/setclasspath.bat | 13 +------------ bin/setclasspath.sh | 20 +------------------- bin/tool-wrapper.bat | 1 - bin/tool-wrapper.sh | 2 -- webapps/docs/changelog.xml | 3 +++ 7 files changed, 5 insertions(+), 37 deletions(-) diff --git a/bin/catalina.bat b/bin/catalina.bat index de68f534b..56d55103a 100755 --- a/bin/catalina.bat +++ b/bin/catalina.bat @@ -150,7 +150,6 @@ echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat" echo This file is needed to run this program goto end :okSetclasspath -set "BASEDIR=%CATALINA_HOME%" call "%CATALINA_HOME%\bin\setclasspath.bat" %1 if errorlevel 1 goto end diff --git a/bin/catalina.sh b/bin/catalina.sh index a15f4c5cd..4b7006be7 100755 --- a/bin/catalina.sh +++ b/bin/catalina.sh @@ -167,11 +167,9 @@ if $os400; then # 1. owned by the user # 2. owned by the PRIMARY group of the user # this will not work if the user belongs in secondary groups - BASEDIR="$CATALINA_HOME" . "$CATALINA_HOME"/bin/setclasspath.sh else if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then - BASEDIR="$CATALINA_HOME" . "$CATALINA_HOME"/bin/setclasspath.sh else echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" diff --git a/bin/setclasspath.bat b/bin/setclasspath.bat index 6e2a8b98c..e6490334d 100755 --- a/bin/setclasspath.bat +++ b/bin/setclasspath.bat @@ -67,21 +67,10 @@ echo This environment variable is needed to run this program goto exit :okJava -if not "%BASEDIR%" == "" goto gotBasedir -echo The BASEDIR environment variable is not defined -echo This environment variable is needed to run this program -goto exit -:gotBasedir -if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir -echo The BASEDIR environment variable is not defined correctly -echo This environment variable is needed to run this program -goto exit -:okBasedir - rem Don't override the endorsed dir if the user has set it previously if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir rem Set the default -Djava.endorsed.dirs argument -set "JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed" +set "JAVA_ENDORSED_DIRS=%CATALINA_HOME%\endorsed" :gotEndorseddir rem Set standard command for invoking Java. diff --git a/bin/setclasspath.sh b/bin/setclasspath.sh index a43c93586..447e81b90 100755 --- a/bin/setclasspath.sh +++ b/bin/setclasspath.sh @@ -75,29 +75,11 @@ if [ "$1" = "debug" ] ; then fi fi fi -if [ -z "$BASEDIR" ]; then - echo "The BASEDIR environment variable is not defined" - echo "This environment variable is needed to run this program" - exit 1 -fi -if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then - if $os400; then - # -x will Only work on the os400 if the files are: - # 1. owned by the user - # 2. owned by the PRIMARY group of the user - # this will not work if the user belongs in secondary groups - eval - else - echo "The BASEDIR environment variable is not defined correctly" - echo "This environment variable is needed to run this program" - exit 1 - fi -fi # Don't override the endorsed dir if the user has set it previously if [ -z "$JAVA_ENDORSED_DIRS" ]; then # Set the default -Djava.endorsed.dirs argument - JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed + JAVA_ENDORSED_DIRS="$CATALINA_HOME"/endorsed fi # Set standard commands for invoking Java. diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat index eb849db56..9c73d327a 100755 --- a/bin/tool-wrapper.bat +++ b/bin/tool-wrapper.bat @@ -70,7 +70,6 @@ echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat" echo This file is needed to run this program goto end :okSetclasspath -set "BASEDIR=%CATALINA_HOME%" call "%CATALINA_HOME%\bin\setclasspath.bat" %1 if errorlevel 1 goto end diff --git a/bin/tool-wrapper.sh b/bin/tool-wrapper.sh index 45bc8c1d6..a034d10e1 100755 --- a/bin/tool-wrapper.sh +++ b/bin/tool-wrapper.sh @@ -105,11 +105,9 @@ if $os400; then # 1. owned by the user # 2. owned by the PRIMARY group of the user # this will not work if the user belongs in secondary groups - BASEDIR="$CATALINA_HOME" . "$CATALINA_HOME"/bin/setclasspath.sh else if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then - BASEDIR="$CATALINA_HOME" . "$CATALINA_HOME"/bin/setclasspath.sh else echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 8a8ca3730..0d06cb527 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -217,6 +217,9 @@ 51206: Make CATALINA_BASE visible for setenv.sh. (rjung) + + Remove unnecessary variable BASEDIR from scripts. (rjung) + -- 2.11.0