ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From be...@netscape.com (Patrick Beard)
Subject Re: Mac Patches for JShell
Date Mon, 31 Jul 2000 06:32:33 GMT
Here are slightly cleaner patches for the Mac:

Index: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
retrieving revision 1.2
diff -b -u -2 -r1.2 Execute.java
--- jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java	2000/07/25 12:03:26	1.2
+++ jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java	2000/07/31 06:28:52
@@ -118,6 +118,6 @@
 
         if (workingDirectory != null && 
-            !antWorkingDirectory.equals(workingDirectory.getAbsolutePath())) {
-
+            !antWorkingDirectory.equals(workingDirectory.getAbsolutePath()) &&
+            !myos.equals("Mac OS")) {
             if (myos.toLowerCase().indexOf("windows") >= 0 &&
                 myos.toLowerCase().indexOf("nt") >= 0) {
@@ -130,5 +130,4 @@
                 commandLine[4] = "&&";
                 System.arraycopy(cmdl, 0, commandLine, 5, cmdl.length);
-
             } else {
                 commandLine = new String[cmdl.length+2];
@@ -190,4 +189,7 @@
      */
     public void setAntRun(Project project) throws BuildException {
+    	if (myos.equals("Mac OS"))
+    		return;
+    	
         String ant = project.getProperty("ant.home");
         if (ant == null) {

Index: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java,v
retrieving revision 1.15
diff -b -u -2 -r1.15 Exec.java
--- jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java	2000/07/15 06:31:42	1.15
+++ jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exec.java	2000/07/31 06:28:50
@@ -94,5 +94,9 @@
         if (dir == null) dir = project.getBaseDir();
 
-        if (myos.toLowerCase().indexOf("windows") >= 0) {
+		if (myos.equals("Mac OS")) {
+			// MRJ tracks "user.dir" property for the current working directory.
+			if (!dir.equals(project.resolveFile(".")))
+				System.getProperties().put("user.dir", dir);
+        } else if (myos.toLowerCase().indexOf("windows") >= 0) {
             if (!dir.equals(project.resolveFile("."))) {
                 if (myos.toLowerCase().indexOf("nt") >= 0) {
-- 

// Patrick C. Beard
// Java Runtime Enthusiast -- "Will invoke interfaces for food."
// mailto:beard@netscape.com

Mime
View raw message