ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: chmod on windows
Date Tue, 04 Jun 2002 15:48:32 GMT
--- Rum Pel <rum_pel@hotmail.com> wrote:
> Whats the equivalent of chmod task on windows?

Jesse Stockall submitted an Attrib task you could use. See:
  http://marc.theaimsgroup.com/?l=ant-dev&m=101196798606223&w=2

Excerpted from one of his follow-ups:
    With the chmod task for Unix & the Attrib task for Windows I can
    make a file read-only for both platforms with the following

      <chmod file="${src}/file.java" perm="-w"/>
      <attrib file="${src}/file.java" perm="+R"/>

    Each task is only executed on the appropriate platform.

> Also, is it possible to execute tasks based on conditions?

The <exec> task allows for os.name, but not os.family -- the <condition>
task has a nested <os> condition that tests for various aspects of the OS
(see the doc for details).

If you want to stay with <exec>, you could use <condition> to set a
property for the name of the executable and the corresponding flags, then
reference those properties in your <exec> task.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message