avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: jakarta-avalon-logkit build.bat build.sh
Date Sun, 24 Mar 2002 01:01:43 GMT
jefft       02/03/23 17:01:43

  Modified:    .        build.bat build.sh
  Log:
  Synch build scripts with jakarta-avalon
  
  Revision  Changes    Path
  1.8       +36 -22    jakarta-avalon-logkit/build.bat
  
  Index: build.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/build.bat,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.bat	15 Dec 2001 07:12:25 -0000	1.7
  +++ build.bat	24 Mar 2002 01:01:43 -0000	1.8
  @@ -1,22 +1,36 @@
  -@echo off
  -
  -if exist "tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=tools
  -if exist "..\jakarta-avalon\tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=..\jakarta-avalon\tools
  -if not "%AVALON_TOOLS%"=="" set LOCAL_AVALON_TOOLS=%AVALON_TOOLS%
  -
  -if not "%LOCAL_AVALON_TOOLS%"=="" goto runAnt
  -
  -echo "Unable to locate tools directory at "
  -echo "../jakarta-avalon/tools/ or tools/. "
  -echo "Aborting."
  -goto end
  -
  -:runAnt
  -set OLD_ANT_HOME=%ANT_HOME%
  -set ANT_HOME=%LOCAL_AVALON_TOOLS%
  -%LOCAL_AVALON_TOOLS%\bin\ant.bat -logger org.apache.tools.ant.NoBannerLogger -emacs -Dtools.dir=%LOCAL_AVALON_TOOLS%
%1 %2 %3 %4 %5 %6 %7 %8
  -set ANT_HOME=%OLD_ANT_HOME%
  -set OLD_ANT_HOME=
  -
  -:end
  -set LOCAL_AVALON_TOOLS=
  +@echo off
  +
  +rem Script to invoke the Ant that comes with jakarta-avalon
  +rem
  +rem Tries to guess location of jakarta-avalon\tools directory containing Ant.
  +rem To specify this directly, set the AVALON_TOOLS variable, eg:
  +rem set AVALON_TOOLS=c:\Jakarta\jakarta-avalon
  +rem
  +rem This can also be called from other batch scripts. If so, the BASE variable
  +rem should be preset to the path from the caller to this script (generally
  +rem '..\'s)
  +
  +
  +if "%BASE%"=="" set BASE=.
  +if exist "%BASE%\tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=tools
  +if exist "%BASE%\..\jakarta-avalon\tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=%BASE%\..\jakarta-avalon\tools
  +if exist "%BASE%\..\..\jakarta-avalon\tools\bin\ant.bat" set LOCAL_AVALON_TOOLS=%BASE%\..\..\jakarta-avalon\tools
  +if not "%AVALON_TOOLS%"=="" set LOCAL_AVALON_TOOLS=%AVALON_TOOLS%
  +
  +if not "%LOCAL_AVALON_TOOLS%"=="" goto runAnt
  +
  +echo "Unable to locate tools directory at "
  +echo "..\jakarta-avalon\tools or ..\..\jakarta-avalon\tools or tools\. "
  +echo "Aborting."
  +goto end
  +
  +:runAnt
  +set OLD_ANT_HOME=%ANT_HOME%
  +set ANT_HOME=%LOCAL_AVALON_TOOLS%
  +%LOCAL_AVALON_TOOLS%\bin\ant.bat -logger org.apache.tools.ant.NoBannerLogger -emacs -Dtools.dir=%LOCAL_AVALON_TOOLS%
%1 %2 %3 %4 %5 %6 %7 %8
  +set ANT_HOME=%OLD_ANT_HOME%
  +set OLD_ANT_HOME=
  +
  +:end
  +set LOCAL_AVALON_TOOLS=
  +set BASE=
  
  
  
  1.6       +14 -4     jakarta-avalon-logkit/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-logkit/build.sh,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.sh	20 Dec 2001 09:42:34 -0000	1.5
  +++ build.sh	24 Mar 2002 01:01:43 -0000	1.6
  @@ -1,15 +1,25 @@
   #!/bin/sh
   
  +# Script for invoking the Ant bundled with jakarta-avalon, from Avalon
  +# projects. Location-independent; will run build.xml in whichever directory
  +# you're in.
  +
  +BASE=`dirname $0`  # Directory containing this script. Not the same as $PWD.
  +                   # The rest of this script assumes it's in a directory
  +                   # at the level of jakarta-avalon
  +
   LOCAL_AVALON_TOOLS=$AVALON_TOOLS
   
   if [ "$AVALON_TOOLS" = "" ] ; then
  -    if [ -d ../jakarta-avalon/tools ] ; then
  -        LOCAL_AVALON_TOOLS=../jakarta-avalon/tools
  +    # Absolutize directory; it's not safe to pass relative dirs to buildfiles
  +    MAYBE_TOOLS=$PWD/$BASE/../jakarta-avalon/tools 
  +    if [ -d $MAYBE_TOOLS ] ; then
  +        LOCAL_AVALON_TOOLS=$MAYBE_TOOLS
       elif [ -d tools ] ; then
  -        LOCAL_AVALON_TOOLS=tools
  +        LOCAL_AVALON_TOOLS=$PWD/$BASE/tools
       else
           echo "Unable to locate tools directory at "
  -        echo "../jakarta-avalon/tools/ or tools/. "
  +        echo "$MAYBE_TOOLS or $BASE/tools/. "
           echo "Aborting."
           exit 1
       fi
  
  
  

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


Mime
View raw message