tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/bin jasper.sh
Date Wed, 12 Sep 2001 00:54:28 GMT
craigmcc    01/09/11 17:54:28

  Modified:    catalina/src/bin catalina.sh digest.sh
               jasper/src/bin jasper.sh
  Log:
  Bring CYGWIN support for all Unix shell scripts up to date with the
  recommended practice:
  * Convert everything into Unix-like paths
  * Manipulate paths as required
  * Convert back to Windows-like paths
  
  ***PLEASE*** check this out for correctness - I do not have a CYGWIN
  environment set up to try it on.
  
  Submitted by:	Stephane Bailliez <sbailliez@imediation.com>
  
  Revision  Changes    Path
  1.18      +32 -7     jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
  
  Index: catalina.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- catalina.sh	2001/08/27 19:10:25	1.17
  +++ catalina.sh	2001/09/12 00:54:28	1.18
  @@ -20,7 +20,7 @@
   #                 command is executed.  Defaults to
   #                 "-classic -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
   #
  -# $Id: catalina.sh,v 1.17 2001/08/27 19:10:25 craigmcc Exp $
  +# $Id: catalina.sh,v 1.18 2001/09/12 00:54:28 craigmcc Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -62,6 +62,24 @@
     exit 1
   fi
   
  +
  +# ----- Cygwin Unix Paths Setup -----------------------------------------------
  +
  +# Cygwin support.  $cygwin _must_ be set to either true or false.
  +case "`uname`" in
  +  CYGWIN*) cygwin=true ;;
  +  *) cygwin=false ;;
  +esac
  + 
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin ; then
  +  [ -n "$CATALINA_HOME" ] &&
  +    CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
  +    [ -n "$JAVA_HOME" ] &&
  +    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +fi
  +
  +
   # ----- Set Up The System Classpath -------------------------------------------
   
   CP="$CATALINA_HOME/bin/bootstrap.jar"
  @@ -70,23 +88,30 @@
     CP=$CP:"$JAVA_HOME/lib/tools.jar"
   fi
   
  +
  +# ----- Cygwin Windows Paths Setup --------------------------------------------
  +
   # convert the existing path to windows
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  +if $cygwin ; then
      CP=`cygpath --path --windows "$CP"`
      CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"`
  +   JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   fi
  +
   
  -# copy to CATALINA_BASE if necessary
  +# ----- Set Up CATALINA_BASE If Necessary -------------------------------------
  +
   if [ -z "$CATALINA_BASE" ] ; then
     CATALINA_BASE=$CATALINA_HOME
   fi
   
  -echo "Using CLASSPATH: $CP"
  -echo "Using CATALINA_BASE: $CATALINA_BASE"
  -echo "Using CATALINA_HOME: $CATALINA_HOME"
  -
   
   # ----- Execute The Requested Command -----------------------------------------
  +
  +echo "Using CLASSPATH:     $CP"
  +echo "Using CATALINA_BASE: $CATALINA_BASE"
  +echo "Using CATALINA_HOME: $CATALINA_HOME"
  +echo "Using JAVA_HOME:     $JAVA_HOME"
   
   if [ "$1" = "jpda" ] ; then
     CATALINA_OPTS="${CATALINA_OPTS} ${JPDA_OPTS}"
  
  
  
  1.4       +17 -7     jakarta-tomcat-4.0/catalina/src/bin/digest.sh
  
  Index: digest.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/digest.sh,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- digest.sh	2001/09/10 20:12:58	1.3
  +++ digest.sh	2001/09/12 00:54:28	1.4
  @@ -10,7 +10,7 @@
   #   This script is assumed to run from the bin directory or have the
   #   CATALINA_HOME env variable set.
   #
  -# $Id: digest.sh,v 1.3 2001/09/10 20:12:58 ccain Exp $
  +# $Id: digest.sh,v 1.4 2001/09/12 00:54:28 craigmcc Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -44,7 +44,9 @@
     exit 1
   fi
   
  -# ----- Set Up The System Classpath -------------------------------------------
  +
  +# ----- Cygwin Unix Paths Setup -----------------------------------------------
  +
   # Cygwin support.  $cygwin _must_ be set to either true or false.
   case "`uname`" in
     CYGWIN*) cygwin=true ;;
  @@ -59,30 +61,38 @@
       JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   fi
   
  +
  +# ----- Set Up The System Classpath -------------------------------------------
  +
   CP="$CATALINA_HOME/server/lib/catalina.jar"
   
   if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then
     CP=$CP:"$JAVA_HOME/lib/tools.jar"
   fi
   
  +
  +# ----- Cygwin Windows Paths Setup --------------------------------------------
  +
   # convert the existing path to windows
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  +if $cygwin ; then
      CP=`cygpath --path --windows "$CP"`
      CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"`
  +   JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   fi
   
  -echo "Using CLASSPATH: $CP"
  -echo "Using CATALINA_HOME: $CATALINA_HOME"
  -
   
   # ----- Execute The Requested Command -----------------------------------------
   
  +echo "Using CLASSPATH:     $CP"
  +echo "Using CATALINA_HOME: $CATALINA_HOME"
  +echo "Using JAVA_HOME:     $JAVA_HOME"
  +
   if [ "$1" != "-a" ] || [ -z "$2" ] || [ -z "$3" ] ; then
   
     echo "Usage:  digest -a [algorithm] [credentials]"
     echo "Commands:"
     echo "  algorithm   -   The algorithm to use, i.e. MD5, SHA1"
  -  echo "  credentials -   The credential to digest"
  +  echo "  credentials -   The credentials to digest"
   
     exit 1
   
  
  
  
  1.4       +28 -6     jakarta-tomcat-4.0/jasper/src/bin/jasper.sh
  
  Index: jasper.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jasper.sh,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jasper.sh	2001/03/15 00:37:18	1.3
  +++ jasper.sh	2001/09/12 00:54:28	1.4
  @@ -13,7 +13,7 @@
   #   JAVA_HOME     
   #       Must point at your Java Development Kit installation.
   #
  -# $Id: jasper.sh,v 1.3 2001/03/15 00:37:18 horwat Exp $
  +# $Id: jasper.sh,v 1.4 2001/09/12 00:54:28 craigmcc Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -51,26 +51,48 @@
     exit 1
   fi
   
  +
  +# ----- Cygwin Unix Paths Setup -----------------------------------------------
  +
  +# Cygwin support.  $cygwin _must_ be set to either true or false.
  +case "`uname`" in
  +  CYGWIN*) cygwin=true ;;
  +  *) cygwin=false ;;
  +esac
  + 
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin ; then
  +  [ -n "$JASPER_HOME" ] &&
  +    JASPER_HOME=`cygpath --unix "$JASPER_HOME"`
  +    [ -n "$JAVA_HOME" ] &&
  +    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +fi
  +
  +
   # ----- Set Up The System Classpath -------------------------------------------
   
  -# FIXME CP=$JASPER_HOME/dummy
  -# FIXME below
   CP=$CP:$JASPER_HOME/classes
   for i in $JASPER_HOME/lib/*.jar $JASPER_HOME/jasper/*.jar ; do
     CP=$CP:$i
   CP=$CP:$JASPER_HOME/common/lib/servlet.jar
   done
   
  +
  +# ----- Cygwin Windows Paths Setup --------------------------------------------
  +
   # convert the existing path to windows
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  +if $cygwin ; then
      CP=`cygpath --path --windows "$CP"`
      JASPER_HOME=`cygpath --path --windows "$JASPER_HOME"`
  +   JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
   fi
   
  -echo Using CLASSPATH: $CP
   
  -
   # ----- Execute The Requested Command -----------------------------------------
  +
  +echo "Using CLASSPATH:   $CP"
  +echo "Using JASPER_HOME: $JASPER_HOME"
  +echo "Using JAVA_HOME:   $JAVA_HOME"
   
   if [ "$1" = "jspc" ] ; then
   
  
  
  

Mime
View raw message