You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2002/05/07 14:50:57 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition Os.java

bodewig     02/05/07 05:50:57

  Modified:    .        Tag: ANT_15_BRANCH WHATSNEW
               docs/manual/CoreTasks Tag: ANT_15_BRANCH conditions.html
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
                        Execute.java
               src/main/org/apache/tools/ant/taskdefs/condition Tag:
                        ANT_15_BRANCH Os.java
  Log:
  Support z/OS as OS family and use /bin/env instead of /usr/bin/env on
  this platform.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.263.2.5 +4 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.263.2.4
  retrieving revision 1.263.2.5
  diff -u -r1.263.2.4 -r1.263.2.5
  --- WHATSNEW	7 May 2002 12:06:49 -0000	1.263.2.4
  +++ WHATSNEW	7 May 2002 12:50:57 -0000	1.263.2.5
  @@ -18,6 +18,10 @@
   JDK 1.1 and 1.2, even if the class could be found on the
   user-specified classpath.
   
  +* z/OS now gets detected by the os condition.
  +
  +* <property environment=... /> now works on z/OS.
  +
   Changes from Ant 1.4.1 to 1.5beta1
   ==================================
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.1   +1 -0      jakarta-ant/docs/manual/CoreTasks/conditions.html
  
  Index: conditions.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/conditions.html,v
  retrieving revision 1.9
  retrieving revision 1.9.2.1
  diff -u -r1.9 -r1.9.2.1
  --- conditions.html	19 Apr 2002 07:15:02 -0000	1.9
  +++ conditions.html	7 May 2002 12:50:57 -0000	1.9.2.1
  @@ -93,6 +93,7 @@
     <li>netware (for Novell NetWare)</li>
     <li>os/2 (for OS/2)</li>
     <li>win9x for Microsoft Windows 95 and 98</li>
  +  <li>z/os for z/OS and OS/390</li>
   </ul>
   
   <h4>equals</h4>
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.43.2.2  +4 -1      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/Execute.java,v
  retrieving revision 1.43.2.1
  retrieving revision 1.43.2.2
  diff -u -r1.43.2.1 -r1.43.2.2
  --- Execute.java	7 May 2002 00:29:21 -0000	1.43.2.1
  +++ Execute.java	7 May 2002 12:50:57 -0000	1.43.2.2
  @@ -78,7 +78,7 @@
    *
    * @since Ant 1.2
    *
  - * @version $Revision: 1.43.2.1 $
  + * @version $Revision: 1.43.2.2 $
    */
   public class Execute {
   
  @@ -231,6 +231,9 @@
                   String[] cmd = {"command.com", "/c", "set" };
                   return cmd;
               }
  +        } else if (Os.isFamily("z/os")) {
  +            String[] cmd = {"/bin/env"};
  +            return cmd;
           } else if (Os.isFamily("unix")) {
               // Generic UNIX
               // Alternatively one could use: /bin/sh -c env
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.15.2.1  +5 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java
  
  Index: Os.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java,v
  retrieving revision 1.15
  retrieving revision 1.15.2.1
  diff -u -r1.15 -r1.15.2.1
  --- Os.java	15 Apr 2002 14:56:30 -0000	1.15
  +++ Os.java	7 May 2002 12:50:57 -0000	1.15.2.1
  @@ -64,7 +64,7 @@
    * @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
    * @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
    * @since Ant 1.4
  - * @version $Revision: 1.15 $
  + * @version $Revision: 1.15.2.1 $
    */
   public class Os implements Condition {
       private static final String osName =
  @@ -99,6 +99,7 @@
        *               <li>unix</li>
        *               <li>windows</li>
        *               <li>win9x</li>
  +     *               <li>z/os</li>
        *               </ul>
        */
       public void setFamily(String f) {family = f.toLowerCase(Locale.US);}
  @@ -221,6 +222,9 @@
                           !(osName.indexOf("nt") >= 0 ||
                             osName.indexOf("2000") >= 0 ||
                             osName.indexOf("xp") >= 0);
  +                } else if (family.equals("z/os")) {
  +                    isFamily = osName.indexOf("z/os") > -1 
  +                        || osName.indexOf("os/390") > -1;
                   } else {
                       throw new BuildException(
                           "Don\'t know how to detect os family \""
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>