Remove unnecessary variable BASEDIR from scripts.
authorrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 23 Jun 2011 11:27:57 +0000 (11:27 +0000)
committerrjung <rjung@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 23 Jun 2011 11:27:57 +0000 (11:27 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1138835 13f79535-47bb-0310-9956-ffa450edef68

bin/catalina.bat
bin/catalina.sh
bin/setclasspath.bat
bin/setclasspath.sh
bin/tool-wrapper.bat
bin/tool-wrapper.sh
webapps/docs/changelog.xml

index de68f53..56d5510 100755 (executable)
@@ -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
 
index a15f4c5..4b7006b 100755 (executable)
@@ -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"
index 6e2a8b9..e649033 100755 (executable)
@@ -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.
index a43c935..447e81b 100755 (executable)
@@ -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.
index eb849db..9c73d32 100755 (executable)
@@ -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
 
index 45bc8c1..a034d10 100755 (executable)
@@ -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"
index 8a8ca37..0d06cb5 100644 (file)
       <fix>
         <bug>51206</bug>: Make CATALINA_BASE visible for setenv.sh. (rjung)
       </fix>
+      <update>
+        Remove unnecessary variable BASEDIR from scripts. (rjung)
+      </update>
     </changelog>
   </subsection>
 </section>