Browse Source

Make perforce tasks work on Windows 2000 as well.

Reported by:	Craig Kelley <ckelley@HotPOP.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268321 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
795157a46f
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java

+ 6
- 1
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java View File

@@ -111,10 +111,15 @@ public abstract class P4Base extends org.apache.tools.ant.Task {
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


Loading…
Cancel
Save