You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@locus.apache.org on 2000/03/01 21:24:26 UTC

cvs commit: jakarta-tomcat/src/shell tomcat.bat tomcat.sh

costin      00/03/01 12:24:26

  Modified:    src/shell tomcat.bat tomcat.sh
  Log:
  Fixed/enhanced sh script, fix typo in bat and small change in
  CLASSPATH setting.
  
  Revision  Changes    Path
  1.15      +8 -10     jakarta-tomcat/src/shell/tomcat.bat
  
  Index: tomcat.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.bat,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- tomcat.bat	2000/02/26 20:44:15	1.14
  +++ tomcat.bat	2000/03/01 20:24:23	1.15
  @@ -1,20 +1,18 @@
   @echo off
  -rem $Id: tomcat.bat,v 1.14 2000/02/26 20:44:15 rubys Exp $
   rem A batch file to start/stop tomcat server.
   
   rem This batch file written and tested under Windows NT
   rem Improvements to this file are welcome
   
  -set jsdkJars=%TOMCAT_HOME%\lib\webserver.jar;%TOMCAT_HOME%\lib\servlet.jar
  -set jspJars=%TOMCAT_HOME%\lib\jasper.jar
  -set miscJars=%TOMCAT_HOME%\lib\xml.jar
  -set appJars=%jsdkJars%;%jspJars%;%miscJars%
  -set sysJars=%JAVA_HOME%\lib\tools.jar
  -
  -set appClassPath=%TOMCAT_HOME%\classes;%appJars%
   set cp=%CLASSPATH%
   
  -set CLASSPATH=%appClassPath%;%sysJars%
  +set CLASSPATH=.
  +set CLASSPATH=%TOMCAT_HOME%\classes
  +set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
  +set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
  +set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
  +set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
  +set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
   
   if "%cp%" == "" goto next
   
  @@ -61,7 +59,7 @@
   :runAnt
   rem Run ant
   echo Using classpath: %CLASSPATH%
  -java -Dant.home=%TOMACT_HOME%  -Dtomcat.home=%TOMCAT_HOME% org.apache.tools.ant.Main $@
  +java -Dant.home=%TOMCAT_HOME%  -Dtomcat.home=%TOMCAT_HOME% org.apache.tools.ant.Main $@
   goto cleanup
   
   :runJspc
  
  
  
  1.13      +29 -13    jakarta-tomcat/src/shell/tomcat.sh
  
  Index: tomcat.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- tomcat.sh	2000/02/24 23:01:32	1.12
  +++ tomcat.sh	2000/03/01 20:24:23	1.13
  @@ -1,6 +1,6 @@
   #!/bin/sh
   #
  -# $Id: tomcat.sh,v 1.12 2000/02/24 23:01:32 costin Exp $
  +# $Id: tomcat.sh,v 1.13 2000/03/01 20:24:23 costin Exp $
   
   # Shell script to start and stop the server
   
  @@ -17,16 +17,7 @@
   fi
   
   if [ "$TOMCAT_HOME" = "" ] ; then
  -  # try to find tomcat
  -  if [ -d ${HOME}/opt/tomcat/conf ] ; then 
  -    TOMCAT_HOME=${HOME}/opt/tomcat
  -  fi
  -
  -  if [ -d /opt/tomcat/conf ] ; then 
  -    TOMCAT_HOME=/opt/tomcat
  -  fi
  -
  -  ## resolve links - $0 may be a link to ant's home
  +  ## resolve links - $0 may be a link to  home
     PRG=$0
     progname=`basename $0`
     
  @@ -40,8 +31,33 @@
       fi
     done
     
  -  TOMCAT_HOME=`dirname "$PRG"`/..
  +  TOMCAT_HOME_1=`dirname "$PRG"`/..
  +  echo "Guessing TOMCAT_HOME from tomcat.sh to ${TOMCAT_HOME_1}" 
  +  if [ -d ${TOMCAT_HOME_1}/conf ] ; then 
  +      TOMCAT_HOME=${TOMCAT_HOME_1}
  +      echo "Setting TOMCAT_HOME to $TOMCAT_HOME"
  +  fi
  +fi
  +
  +
  +if [ "$TOMCAT_HOME" = "" ] ; then
  +  # try to find tomcat
  +  if [ -d ${HOME}/opt/tomcat/conf ] ; then 
  +    TOMCAT_HOME=${HOME}/opt/tomcat
  +    echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME"
  +  fi
   
  +  if [ -d /opt/tomcat/conf ] ; then 
  +    TOMCAT_HOME=/opt/tomcat
  +    echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME"
  +  fi
  + 
  +  # Add other "standard" locations for tomcat
  +fi
  +
  +if [ "$TOMCAT_HOME" = "" ] ; then
  +    echo Can't find TOMCAT_HOME, you need to set it or install in a standard location
  +    exit 1
   fi
   
   if [ -z "$JAVA_HOME" ] ;  then
  @@ -82,7 +98,7 @@
   
   export CLASSPATH
   
  -if [ ! -f server.xml ] ; then 
  +if [ ! -f conf/server.xml ] ; then 
      if [ "$2" = "" ] ; then
        # Probably we are in a wrong directory, use tomcat_home
        # If arguments are passed besides start/stop, probably a -f was used,