User: user57  
  Date: 02/01/03 16:09:54

  Modified:    src/bin  run.sh shutdown.sh
  Log:
   o added support to use these on win32 using cygwin
  
  Revision  Changes    Path
  1.33      +39 -6     jboss/src/bin/run.sh
  
  Index: run.sh
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/bin/run.sh,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- run.sh    2001/12/08 18:23:39     1.32
  +++ run.sh    2002/01/04 00:09:54     1.33
  @@ -5,7 +5,7 @@
   ##                                                                          ##
   ### ====================================================================== ###
   
  -### $Id: run.sh,v 1.32 2001/12/08 18:23:39 starksm Exp $ ###
  +### $Id: run.sh,v 1.33 2002/01/04 00:09:54 user57 Exp $ ###
   
   DIRNAME=`dirname $0`
   PROGNAME=`basename $0`
  @@ -19,30 +19,51 @@
       exit 1
   }
   
  +# OS specific support (must be 'true' or 'false').
  +cygwin=false;
  +case "`uname`" in
  +    CYGWIN*)
  +        cygwin=true
  +        ;;
  +esac
  +
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin ; then
  +    [ -n "$JBOSS_HOME" ] &&
  +        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
  +    [ -n "$JAVA_HOME" ] &&
  +        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +    [ -n "$JAVAC_JAR" ] &&
  +        JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`
  +fi
  +
   # Setup JBOSS_HOME
   if [ "x$JBOSS_HOME" = "x" ]; then
  +    # get the full path (without any relative bits)
       JBOSS_HOME=`cd $DIRNAME/..; pwd`
   fi
   export JBOSS_HOME
   
   # Setup the JVM
   if [ "x$JAVA_HOME" != "x" ]; then
  -    JAVA=$JAVA_HOME/bin/java
  +    JAVA="$JAVA_HOME/bin/java"
   else
       JAVA="java"
   fi
   
   # Setup the classpath
   JBOSS_BOOT_CLASSPATH="$JBOSS_HOME/bin/run.jar"
  +
   # Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
   # compatible distribution which JAVA_HOME points to
   if [ "x$JAVAC_JAR" = "x" ]; then
  -    JAVAC_JAR=$JAVA_HOME/lib/tools.jar
  +    JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
   fi
  +
   if [ "x$JBOSS_CLASSPATH" = "x" ]; then
  -    JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR:"
  +    JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
   else
  -    JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR:"
  +    JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
   fi
   
   # Check for SUN(tm) JVM w/ HotSpot support
  @@ -84,10 +105,22 @@
   JAVA_OPTS="$JAVA_OPTS -Djavax.xml.parsers.DocumentBuilderFactory=$JAXP_DOM_FACTORY"
   JAVA_OPTS="$JAVA_OPTS -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY"
   
  +# Where we need to be to start the server
  +startdir="$JBOSS_HOME/bin"
  +
  +# For Cygwin, switch paths to Windows format before running java
  +if $cygwin; then
  +    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
  +    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  +    JBOSS_CLASSPATH=`cygpath --path --windows "$JBOSS_CLASSPATH"`
  +fi
  +
   # Display our environment
   echo 
"================================================================================"
   echo " JBoss Bootstrap Environment"
   echo ""
  +echo " JBOSS_HOME: $JBOSS_HOME"
  +echo ""
   echo " JAVA: $JAVA"
   echo ""
   echo " JAVA_OPTS: $JAVA_OPTS"
  @@ -98,7 +131,7 @@
   echo ""
   
   # Make sure we are in the correctly directory
  -cd $JBOSS_HOME/bin
  +cd $startdir
   
   # Execute the JVM
   exec $JAVA \
  
  
  
  1.2       +25 -1     jboss/src/bin/shutdown.sh
  
  Index: shutdown.sh
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/bin/shutdown.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- shutdown.sh       2001/12/09 05:21:56     1.1
  +++ shutdown.sh       2002/01/04 00:09:54     1.2
  @@ -5,7 +5,7 @@
   ##                                                                          ##
   ### ====================================================================== ###
   
  -### $Id: shutdown.sh,v 1.1 2001/12/09 05:21:56 user57 Exp $ ###
  +### $Id: shutdown.sh,v 1.2 2002/01/04 00:09:54 user57 Exp $ ###
   
   DIRNAME=`dirname $0`
   PROGNAME=`basename $0`
  @@ -19,6 +19,22 @@
       exit 1
   }
   
  +# OS specific support (must be 'true' or 'false').
  +cygwin=false;
  +case "`uname`" in
  +    CYGWIN*)
  +        cygwin=true
  +        ;;
  +esac
  +
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin ; then
  +    [ -n "$JBOSS_HOME" ] &&
  +        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
  +    [ -n "$JAVA_HOME" ] &&
  +        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +fi
  +
   # Setup JBOSS_HOME
   if [ "x$JBOSS_HOME" = "x" ]; then
       JBOSS_HOME=`cd $DIRNAME/..; pwd`
  @@ -34,10 +50,18 @@
   
   # Setup the classpath
   JBOSS_BOOT_CLASSPATH="$JBOSS_HOME/bin/shutdown.jar"
  +
   if [ "x$JBOSS_CLASSPATH" = "x" ]; then
       JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH"
   else
       JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH"
  +fi
  +
  +# For Cygwin, switch paths to Windows format before running java
  +if $cygwin; then
  +    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
  +    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  +    JBOSS_CLASSPATH=`cygpath --path --windows "$JBOSS_CLASSPATH"`
   fi
   
   # Execute the JVM
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to