ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject RE: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Thu, 12 Apr 2001 00:07:59 GMT
Hmmm,

Not sure I like the use of floats in this. Perhaps we should be parsing out
major and minor version numbers as ints.

Conor


> -----Original Message-----
> From: donaldp@apache.org [mailto:donaldp@apache.org]
> Sent: Thursday, 12 April 2001 8:44 AM
> To: jakarta-ant-cvs@apache.org
> Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs
> Execute.java
>
>
> donaldp     01/04/11 15:44:20
>
>   Modified:    src/main/org/apache/tools/ant/taskdefs Execute.java
>   Log:
>   Updated ant to get environment from MacOS X
>
>   Submitted By: Archit Shah <ashah@arsdigita.com>
>
>   Revision  Changes    Path
>   1.15      +12 -0
> 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/Execu
> te.java,v
>   retrieving revision 1.14
>   retrieving revision 1.15
>   diff -u -r1.14 -r1.15
>   --- Execute.java	2001/02/18 13:44:42	1.14
>   +++ Execute.java	2001/04/11 22:44:19	1.15
>   @@ -179,6 +179,18 @@
>            String osname = System.getProperty("os.name").toLowerCase();
>            if ( osname.indexOf("mac os") >= 0 ) {
>                // 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
>                String[] cmd = null;
>                return cmd;
>
>
>
>


Mime
View raw message