bodewig     00/12/06 02:46:22

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/perforce
                        P4Base.java
  Log:
  Make perforce tasks work on Windows 2000 as well.
  
  Reported by:  Craig Kelley <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.2       +6 -1      
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
  
  Index: P4Base.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- P4Base.java       2000/11/28 16:46:43     1.1
  +++ P4Base.java       2000/12/06 10:46:20     1.2
  @@ -111,10 +111,15 @@
           
           String myOS = System.getProperty("os.name");
           if(myOS == null) throw new BuildException("Unable to determine OS");
  +        myOS = myOS.toLowerCase();
           
  -        if(myOS.toLowerCase().indexOf("nt") >= 0) {
  +        if( myOS.indexOf("os/2") >= 0 ) {
               shell = "cmd /c ";
  +        } else if( myOS.startsWith("windows") 
  +                   && (myOS.indexOf("2000") >= 0 || myOS.indexOf("nt") >= 0 
) ) {
  +            shell = "cmd /c ";
           } else {
  +            // What about Mac OS? No perforce support there?
               shell = "/bin/sh "; //This needs testing on Unix!!!!
           }
           //Get default P4 settings from environment - Mark would have done 
something cool with
  
  
  

Reply via email to