incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: incubator-ftpserver ftpd_dev.sh ftpd_ui_dev.sh ftpd_dev.bat ftpd_ui_dev.bat
Date Wed, 28 Sep 2005 10:57:51 GMT
rana_b      2005/09/28 03:57:50

  Modified:    .        ftpd_dev.bat ftpd_ui_dev.bat
  Added:       .        ftpd_dev.sh ftpd_ui_dev.sh
  Log:
  scripts changed to make it more effective
  
  Revision  Changes    Path
  1.2       +38 -2     incubator-ftpserver/ftpd_dev.bat
  
  Index: ftpd_dev.bat
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/ftpd_dev.bat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ftpd_dev.bat	7 Sep 2005 05:13:54 -0000	1.1
  +++ ftpd_dev.bat	28 Sep 2005 10:57:50 -0000	1.2
  @@ -1,3 +1,39 @@
   @echo off
  -REM CUSTOM_CLASSPATH=
  -%JAVA_HOME%\bin\java -classpath ./build/classes;%CUSTOM_CLASSPATH% org.apache.ftpserver.FtpServer
%*
  \ No newline at end of file
  +rem Copyright 2002-2004 The Apache Software Foundation or its licensors,
  +rem as applicable.
  +rem
  +rem Licensed under the Apache License, Version 2.0 (the "License");
  +rem you may not use this file except in compliance with the License.
  +rem You may obtain a copy of the License at
  +rem
  +rem     http://www.apache.org/licenses/LICENSE-2.0
  +rem
  +rem Unless required by applicable law or agreed to in writing, software
  +rem distributed under the License is distributed on an "AS IS" BASIS,
  +rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +rem See the License for the specific language governing permissions and
  +rem limitations under the License.
  +
  +if "%OS%"=="Windows_NT" @setlocal
  +if "%OS%"=="WINNT" @setlocal
  +
  +rem ----- use the location of this script to infer $FTPD_HOME -------
  +if NOT "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=.
  +if "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=%~dp0
  +if "%OS%"=="WINNT" set DEFAULT_FTPD_HOME=%~dp0
  +if "%FTPD_HOME%"=="" set FTPD_HOME=%DEFAULT_FTPD_HOME%
  +
  +rem ----- Save and set CLASSPATH --------------------------------------------
  +set OLD_CLASSPATH=%CLASSPATH%
  +set CLASSPATH=%CLASSPATH%;%FTPD_HOME%\target\classes;
  +cd /d "%FTPD_HOME%\lib"
  +for %%i in ("*.jar") do call "%FTPD_HOME%\src\bin\appendcp.bat" "%FTPD_HOME%\lib\%%i"
  +cd /d "%FTPD_HOME%"
  +
  +rem ----- call java.. ---------------------------------------------------
  +set MAIN_CLASS=org.apache.ftpserver.FtpServer
  +set JAVA_CMD=%JAVA_HOME%\bin\java
  +"%JAVA_CMD%" %MAIN_CLASS% %*
  +
  +rem ---- Restore old CLASSPATH
  +set CLASSPATH=%OLD_CLASSPATH%
  
  
  
  1.2       +38 -2     incubator-ftpserver/ftpd_ui_dev.bat
  
  Index: ftpd_ui_dev.bat
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/ftpd_ui_dev.bat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ftpd_ui_dev.bat	7 Sep 2005 05:13:54 -0000	1.1
  +++ ftpd_ui_dev.bat	28 Sep 2005 10:57:50 -0000	1.2
  @@ -1,3 +1,39 @@
   @echo off
  -REM CUSTOM_CLASSPATH=
  -%JAVA_HOME%\bin\java -classpath ./build/classes;%CUSTOM_CLASSPATH% org.apache.ftpserver.gui.ServerFrame
  \ No newline at end of file
  +rem Copyright 2002-2004 The Apache Software Foundation or its licensors,
  +rem as applicable.
  +rem
  +rem Licensed under the Apache License, Version 2.0 (the "License");
  +rem you may not use this file except in compliance with the License.
  +rem You may obtain a copy of the License at
  +rem
  +rem     http://www.apache.org/licenses/LICENSE-2.0
  +rem
  +rem Unless required by applicable law or agreed to in writing, software
  +rem distributed under the License is distributed on an "AS IS" BASIS,
  +rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +rem See the License for the specific language governing permissions and
  +rem limitations under the License.
  +
  +if "%OS%"=="Windows_NT" @setlocal
  +if "%OS%"=="WINNT" @setlocal
  +
  +rem ----- use the location of this script to infer $FTPD_HOME -------
  +if NOT "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=.
  +if "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=%~dp0
  +if "%OS%"=="WINNT" set DEFAULT_FTPD_HOME=%~dp0
  +if "%FTPD_HOME%"=="" set FTPD_HOME=%DEFAULT_FTPD_HOME%
  +
  +rem ----- Save and set CLASSPATH --------------------------------------------
  +set OLD_CLASSPATH=%CLASSPATH%
  +set CLASSPATH=%CLASSPATH%;%FTPD_HOME%\target\classes;
  +cd /d "%FTPD_HOME%\lib"
  +for %%i in ("*.jar") do call "%FTPD_HOME%\src\bin\appendcp.bat" "%FTPD_HOME%\lib\%%i"
  +cd /d "%FTPD_HOME%"
  +
  +rem ----- call java.. ---------------------------------------------------
  +set MAIN_CLASS=org.apache.ftpserver.gui.ServerFrame
  +set JAVA_CMD=%JAVA_HOME%\bin\java
  +"%JAVA_CMD%" %MAIN_CLASS% %*
  +
  +rem ---- Restore old CLASSPATH
  +set CLASSPATH=%OLD_CLASSPATH%
  
  
  
  1.1                  incubator-ftpserver/ftpd_dev.sh
  
  Index: ftpd_dev.sh
  ===================================================================
  #!/bin/sh
  
  # Copyright 2002-2004 The Apache Software Foundation or its licensors,
  # as applicable.
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  #
  # OS specific support.  $var _must_ be set to either true or false.
  #
  cygwin=false;
  darwin=false;
  case "`uname`" in
    CYGWIN*) cygwin=true ;;
    Darwin*) darwin=true
             if [ -z "$JAVA_HOME" ] ; then
               JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
             fi
             ;;
  esac
  
  #
  # Get the FTPD_HOME variable
  #
  if [ -z "$FTPD_HOME" -o ! -d "$FTPD_HOME" ] ; then
  
    ## resolve links - $0 may be a link to ant's home
    PRG="$0"
    progname=`basename "$0"`
  
    # need this for relative symlinks
    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
  
    FTPD_HOME=`dirname "$PRG"`
  
    # make it fully qualified
    FTPD_HOME=`cd "$FTPD_HOME" && pwd`
  fi
  
  
  #
  # For Cygwin, ensure paths are in UNIX format before anything is touched
  #
  if $cygwin ; then
    [ -n "$FTPD_HOME" ] &&
      FTPD_HOME=`cygpath --unix "$FTPD_HOME"`
    [ -n "$JAVA_HOME" ] &&
      JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  fi
  
  
  #
  # Get the Java command
  #
  if [ -z "$JAVACMD" ] ; then
    if [ -n "$JAVA_HOME"  ] ; then
      if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
      else
        JAVACMD="$JAVA_HOME/bin/java"
      fi
    else
      JAVACMD=`which java 2> /dev/null `
      if [ -z "$JAVACMD" ] ; then
          JAVACMD=java
      fi
    fi
  fi
  
  if [ ! -x "$JAVACMD" ] ; then
    echo "Error: JAVA_HOME is not defined correctly."
    echo "  We cannot execute $JAVACMD"
    exit 1
  fi
  
  
  #
  # Get the path separator
  #
  if [ "$cygwin" = "true" ] ; then
    S=';'
  else
    S=':'
  fi
  
  
  #
  # Build classpath
  #
  if [ "$cygwin" = "true" ] ; then
      FTPD_CLASSPATH=$CLASSPATH$S`cygpath -w $FTPD_HOME/target/classes`
  else
      FTPD_CLASSPATH=$CLASSPATH$S$FTPD_HOME/target/classes
  fi
  
  for i in $FTPD_HOME/lib/*.jar; do
    if [ "$cygwin" = "true" ] ; then
      LIB=`cygpath -w $i`
    else
      LIB=$i
    fi
  
    FTPD_CLASSPATH=$FTPD_CLASSPATH$S$LIB
  done
  
  
  #
  # Execute command
  #
  MAIN_CLASS=org.apache.ftpserver.FtpServer
  "$JAVACMD" -classpath "$FTPD_CLASSPATH" $MAIN_CLASS $@
  RESULT=$?
  exit $RESULT
  
  
  
  1.1                  incubator-ftpserver/ftpd_ui_dev.sh
  
  Index: ftpd_ui_dev.sh
  ===================================================================
  #!/bin/sh
  
  # Copyright 2002-2004 The Apache Software Foundation or its licensors,
  # as applicable.
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  #
  #     http://www.apache.org/licenses/LICENSE-2.0
  #
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  #
  # OS specific support.  $var _must_ be set to either true or false.
  #
  cygwin=false;
  darwin=false;
  case "`uname`" in
    CYGWIN*) cygwin=true ;;
    Darwin*) darwin=true
             if [ -z "$JAVA_HOME" ] ; then
               JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
             fi
             ;;
  esac
  
  #
  # Get the FTPD_HOME variable
  #
  if [ -z "$FTPD_HOME" -o ! -d "$FTPD_HOME" ] ; then
  
    ## resolve links - $0 may be a link to ant's home
    PRG="$0"
    progname=`basename "$0"`
  
    # need this for relative symlinks
    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
  
    FTPD_HOME=`dirname "$PRG"`
  
    # make it fully qualified
    FTPD_HOME=`cd "$FTPD_HOME" && pwd`
  fi
  
  
  #
  # For Cygwin, ensure paths are in UNIX format before anything is touched
  #
  if $cygwin ; then
    [ -n "$FTPD_HOME" ] &&
      FTPD_HOME=`cygpath --unix "$FTPD_HOME"`
    [ -n "$JAVA_HOME" ] &&
      JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  fi
  
  
  #
  # Get the Java command
  #
  if [ -z "$JAVACMD" ] ; then
    if [ -n "$JAVA_HOME"  ] ; then
      if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
      else
        JAVACMD="$JAVA_HOME/bin/java"
      fi
    else
      JAVACMD=`which java 2> /dev/null `
      if [ -z "$JAVACMD" ] ; then
          JAVACMD=java
      fi
    fi
  fi
  
  if [ ! -x "$JAVACMD" ] ; then
    echo "Error: JAVA_HOME is not defined correctly."
    echo "  We cannot execute $JAVACMD"
    exit 1
  fi
  
  
  #
  # Get the path separator
  #
  if [ "$cygwin" = "true" ] ; then
    S=';'
  else
    S=':'
  fi
  
  
  #
  # Build classpath
  #
  if [ "$cygwin" = "true" ] ; then
      FTPD_CLASSPATH=$CLASSPATH$S`cygpath -w $FTPD_HOME/target/classes`
  else
      FTPD_CLASSPATH=$CLASSPATH$S$FTPD_HOME/target/classes
  fi
  
  for i in $FTPD_HOME/lib/*.jar; do
    if [ "$cygwin" = "true" ] ; then
      LIB=`cygpath -w $i`
    else
      LIB=$i
    fi
  
    FTPD_CLASSPATH=$FTPD_CLASSPATH$S$LIB
  done
  
  
  #
  # Execute command
  #
  MAIN_CLASS=org.apache.ftpserver.gui.ServerFrame
  "$JAVACMD" -classpath "$FTPD_CLASSPATH" $MAIN_CLASS $@
  RESULT=$?
  exit $RESULT
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message