ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/myrmidon/src/script mant mant.bat ant ant.bat
Date Thu, 11 Jul 2002 00:41:42 GMT
donaldp     2002/07/10 17:41:42

  Modified:    myrmidon project.xml
  Added:       myrmidon/src/script mant mant.bat
  Removed:     myrmidon/src/script ant ant.bat
  Log:
  Rename scripts to mant so that they can coexist with ant installs
  
  Revision  Changes    Path
  1.10      +2 -2      jakarta-ant-myrmidon/myrmidon/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/myrmidon/project.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- project.xml	12 Jun 2002 06:53:06 -0000	1.9
  +++ project.xml	11 Jul 2002 00:41:42 -0000	1.10
  @@ -62,10 +62,10 @@
               <fileset dir="src/script"/>
           </copy>
           <chmod dir="${dist.dir}" perm="go-rwx" />
  -        <chmod file="${dist.bin}/ant" perm="u+x"/>
  +        <chmod file="${dist.bin}/mant" perm="u+x"/>
           <chmod file="${dist.bin}/antRun" perm="u+x"/>
           <fixcrlf srcdir="${dist.bin}" eol="crlf" includes="*.bat" />
  -        <fixcrlf srcdir="${dist.bin}" eol="lf" includes="*.sh, ant, antRun" />
  +        <fixcrlf srcdir="${dist.bin}" eol="lf" includes="*.sh, mant, antRun" />
   
           <!-- bin/lib/ dir -->
           <mkdir dir="${dist.bin}/lib"/>
  
  
  
  1.1                  jakarta-ant-myrmidon/myrmidon/src/script/mant
  
  Index: mant
  ===================================================================
  #!/bin/sh
  
  if [ -f $HOME/.antrc ] ; then 
    . $HOME/.antrc
  fi
  
  # Cygwin support.
  if [ "$OSTYPE" == "cygwin32" ] || [ "$OSTYPE" = "cygwin" ]; then
    if [ ! "$JAVA_HOME" = "" ]; then
      JAVA_HOME=`cygpath --path --unix $JAVA_HOME`
    fi
  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
    
  ANT_HOME=`dirname "$PRG"`/..
  
  if [ "$JAVA_HOME" == "" ] ; then
    if [ "$JAVACMD" = "" ] ; then
      JAVACMD=java
    fi
  else
    if [ "$JAVACMD" = "" ] ; then 
      JAVACMD=$JAVA_HOME/bin/java
    fi
  fi
  
  $JAVACMD $ANT_OPTS -jar $ANT_HOME/bin/myrmidon-launcher.jar $@
  
  
  
  1.1                  jakarta-ant-myrmidon/myrmidon/src/script/mant.bat
  
  Index: mant.bat
  ===================================================================
  @echo off
  
  if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
  
  if not "%OS%"=="Windows_NT" goto start
  
  rem %~dp0 is name of current script under NT
  set DEFAULT_MYRMIDON_HOME=%~dp0
  
  rem : operator works similar to make : operator
  set DEFAULT_MYRMIDON_HOME=%DEFAULT_MYRMIDON_HOME:\bin\=%
  
  if "%MYRMIDON_HOME%"=="" set MYRMIDON_HOME=%DEFAULT_MYRMIDON_HOME%
  set DEFAULT_MYRMIDON_HOME=
  
  :start
  
  if not "%MYRMIDON_HOME%" == "" goto MYRMIDON_HOME_found
  
  echo.
  echo Warning: MYRMIDON_HOME environment variable is not set.
  echo   This needs to be set for Win9x as it's command prompt 
  echo   scripting bites
  echo.
  goto end
  
  :MYRMIDON_HOME_found
  
  if not "%JAVA_HOME%" == "" goto javaCmdSetup
  
  rem hope that there is java command in path
  if "%JAVACMD%" == "" set JAVACMD=java
  goto argSetup
  
  rem if JAVA_HOME is set then make sure we use that java exe
  :javaCmdSetup
  if "%JAVACMD%" == "" set JAVACMD=%JAVA_HOME%\bin\java
  
  :argSetup
  
  set ANT_CMD_LINE_ARGS=
  
  rem Slurp all args...
  :setupArgs
  if "%0" == "" goto doneArgs
  set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
  shift
  goto setupArgs
  
  :doneArgs
  rem Mmmmmm tasty - finished slurping args
  
  %JAVACMD% %ANT_OPTS% -jar %MYRMIDON_HOME%\bin\myrmidon-launcher.jar %ANT_CMD_LINE_ARGS%
  
  :end
  if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
  set ANT_CMD_LINE_ARGS=
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message