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 1999/12/15 01:30:24 UTC
cvs commit: jakarta-tomcat/src/tests/bin runtest.sh
costin 99/12/14 16:30:24
Modified: src/etc tomcat.conf
src/shell tomcat.sh
src/tests/bin runtest.sh
Log:
More build-related stuff.
- changed tomcat.sh to "guess" TOMCAT_HOME ( or load it from .tomcatrc)
and "cd" if no server.xml is in the current dir ( in order to be
able to start tomcat without the annoying cd )
- first param to runtest.sh will be the port - to be able to test
with apache.
- cleaned up tomcat.conf
Revision Changes Path
1.6 +1 -1 jakarta-tomcat/src/etc/tomcat.conf
Index: tomcat.conf
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/etc/tomcat.conf,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tomcat.conf 1999/12/14 22:32:15 1.5
+++ tomcat.conf 1999/12/15 00:30:23 1.6
@@ -5,7 +5,7 @@
# Note: this file should be appended or included into your httpd.conf
# Tell Apache on win32 to load the Apache JServ communication module
-LoadModule jserv_module modules/ApacheModuleJServ.dll
+# LoadModule jserv_module modules/ApacheModuleJServ.dll
# Tell Apache on Unix to load the Apache JServ communication module
# For shared object builds only!!!
1.4 +37 -1 jakarta-tomcat/src/shell/tomcat.sh
Index: tomcat.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tomcat.sh 1999/12/03 17:01:24 1.3
+++ tomcat.sh 1999/12/15 00:30:23 1.4
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: tomcat.sh,v 1.3 1999/12/03 17:01:24 harishp Exp $
+# $Id: tomcat.sh,v 1.4 1999/12/15 00:30:23 costin Exp $
# Shell script to start and stop the server
@@ -12,6 +12,38 @@
#jre -cp runner.jar:servlet.jar:classes org.apache.tomcat.shell.Startup $*
#java -cp runner.jar:servlet.jar:classes org.apache.tomcat.shell.Startup $*
+if [ -f $HOME/.tomcatrc ] ; then
+ . $HOME/.tomcatrc
+fi
+
+if [ "$TOMCAT_HOME" = "" ] ; then
+ # try to find tomcat
+ if [ -d ${HOME}/opt/tomcat ] ; then
+ TOMCAT_HOME=${HOME}/opt/tomcat
+ fi
+
+ if [ -d /opt/tomcat ] ; then
+ TOMCAT_HOME=/opt/tomcat
+ fi
+
+ ## resolve links - $0 may be a link to ant's home
+ PRG=$0
+ progname=`basename $0`
+
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '.*/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname $PRG`/$link"
+ fi
+ done
+
+ TOMCAT_HOME=`dirname "$PRG"`
+
+fi
+
baseDir=`dirname $0`
if [ -z "$JAVA_HOME" ]
@@ -53,6 +85,10 @@
export CLASSPATH
fi
+if [ ! -f server.xml ] ; then
+ # Probably we are in a wrong directory, use tomcat_home
+ cd ${TOMCAT_HOME}
+fi
# We start the server up in the background for a couple of reasons:
# 1) It frees up your command window
1.6 +8 -3 jakarta-tomcat/src/tests/bin/runtest.sh
Index: runtest.sh
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/tests/bin/runtest.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- runtest.sh 1999/12/08 16:36:28 1.5
+++ runtest.sh 1999/12/15 00:30:23 1.6
@@ -1,11 +1,16 @@
#! /bin/ksh
#
-# $Id: runtest.sh,v 1.5 1999/12/08 16:36:28 harishp Exp $
+# $Id: runtest.sh,v 1.6 1999/12/15 00:30:23 costin Exp $
# Shell script to run test harness
-
+
+if [ "$1" = "" ] ; then
+ port=8080
+else
+ port=$1
+fi
+
host=localhost
-port=8080
test=testlist.txt
cp=$CLASSPATH