ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/script antRun.bat
Date Wed, 14 Feb 2001 13:20:18 GMT
conor       01/02/14 05:20:18

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_13_BRANCH
                        Execute.java
               src/script Tag: ANT_13_BRANCH antRun.bat
  Log:
  Handle exec's occurring on different drives
  
  Submitted by:	David Rees <d.rees.l@usa.net>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.12.2.2  +7 -4      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.2
  diff -u -r1.12.2.1 -r1.12.2.2
  --- Execute.java	2001/02/13 10:19:44	1.12.2.1
  +++ Execute.java	2001/02/14 13:20:18	1.12.2.2
  @@ -571,13 +571,16 @@
   
               // Use cmd.exe to change to the specified directory before running
               // the command
  -            String[] newcmd = new String[cmd.length+5];
  +            final int preCmdLength = 6;
  +            String[] newcmd = new String[cmd.length + preCmdLength];
               newcmd[0] = "cmd";
               newcmd[1] = "/c";
               newcmd[2] = "cd";
  -            newcmd[3] = workingDir.getAbsolutePath();
  -            newcmd[4] = "&&";
  -            System.arraycopy(cmd, 0, newcmd, 5, cmd.length);
  +            newcmd[3] = "/d";
  +            newcmd[4] = workingDir.getAbsolutePath();
  +            newcmd[5] = "&&";
  +            System.arraycopy(cmd, 0, newcmd, preCmdLength, cmd.length);
  +
               return exec(project, newcmd, env);
           }
       }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +20 -18    jakarta-ant/src/script/antRun.bat
  
  Index: antRun.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/antRun.bat,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- antRun.bat	2001/01/23 05:10:39	1.1
  +++ antRun.bat	2001/02/14 13:20:18	1.1.2.1
  @@ -1,18 +1,20 @@
  -@echo off
  -
  -cd %1
  -set ANT_RUN_CMD=%2
  -shift
  -shift
  -
  -set PARAMS=
  -:loop
  -if ""%1 == "" goto runCommand
  -set PARAMS=%PARAMS% %1
  -shift
  -goto loop
  -
  -:runCommand
  -rem echo %ANT_RUN_CMD% %PARAMS%
  -%ANT_RUN_CMD% %PARAMS%
  -
  +@echo off
  +
  +# Change drive and directory to %1 (Win9X only for NT/2K use "cd /d")
  +cd %1
  +%1\
  +set ANT_RUN_CMD=%2
  +shift
  +shift
  +
  +set PARAMS=
  +:loop
  +if ""%1 == "" goto runCommand
  +set PARAMS=%PARAMS% %1
  +shift
  +goto loop
  +
  +:runCommand
  +rem echo %ANT_RUN_CMD% %PARAMS%
  +%ANT_RUN_CMD% %PARAMS%
  +
  
  
  

Mime
View raw message