> > When executing the Ant task
> >
[quoted text clipped - 7 lines]
> Ant will create plain files while copying and they will get your default
> permissions.
If it only would!!! My umask displays at
0022
So the resulting files should then have permissions 0640!
> If they are not correct, use <apply>
OK ... this means I should first write a BAT-file, say CHGPROT.BAT,
containing something like
sh -c chmod 0640 %1
and then use it like this:
<apply executable="CHGPROT.BAT" os="???" >
My fileset goes here...
</apply>
But what do I put for the question marks to indicate that the task
should be executed only under cygwin?
Ronald
Stefan Bodewig - 01 Dec 2003 09:33 GMT
> > Ant will create plain files while copying and they will get your default
> > permissions.
[quoted text clipped - 4 lines]
>
> So the resulting files should then have permissions 0640!
Your Java VM doesn't know anything about Cygwin - so neither does Ant.
The permissions you see are those that any File created by Java will get.
Sorry.
> > If they are not correct, use <apply>
>
[quoted text clipped - 4 lines]
> But what do I put for the question marks to indicate that the task
> should be executed only under cygwin?
Cygwin is not an OS.
Instead of using <apply>'s os attribute, you better check for some Cygwin
indicator (like the presence of a cygwin.user.home property that gets set
by Ant's wrapper script) with <condition> and put the apply into a <target>
that's guarded by if/unless attributes.
Stefan

Signature
http://stefanbodewig.blogger.de/