Browse Source

Updated ant to get environment from MacOS X

Submitted By: Archit Shah <ashah@arsdigita.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268940 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
73a8298528
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      src/main/org/apache/tools/ant/taskdefs/Execute.java

+ 12
- 0
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -179,6 +179,18 @@ public class Execute {
String osname = System.getProperty("os.name").toLowerCase(); String osname = System.getProperty("os.name").toLowerCase();
if ( osname.indexOf("mac os") >= 0 ) { if ( osname.indexOf("mac os") >= 0 ) {
// Mac // Mac
// Determine if we are running under OS X
try {
float version = Float.parseFloat(System.getProperty("os.version"));
if (version >= 10.0) {
// OS X - just line UNIX
String[] cmd = {"/usr/bin/env"};
return cmd;
}
} catch (NumberFormatException e) {
// fall through to OS 9
}
// OS 9 and previous
// TODO: I have no idea how to get it, someone must fix it // TODO: I have no idea how to get it, someone must fix it
String[] cmd = null; String[] cmd = null;
return cmd; return cmd;


Loading…
Cancel
Save