You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Baz <ba...@goodconsultants.com> on 2004/03/17 05:31:56 UTC
Detecting unix style then choose how to copy files?
All,
Sorry to asking similar questions but i am not sure if i am asking the right
questions. I am trying to have the copy working on all platforms, cygwin
windows, dos windows and unix.
<copy> will work fine but not preserving the permission. <chmod> cannot
change modes in dos and cannot change the "others" permission, e.g 777. What
should I do?
So I am thinking that if i encounter "unix" style environment, i.e. Unix and
Cygwin, then use "cp -r" otherwise just use the default <copy>.
What is the best way to do it? Would you please be more details?
Thank you.
B.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Detecting unix style then choose how to copy files?
Posted by Baz <ba...@goodconsultants.com>.
Jack,
Thanks for the reply. For example, if i want to chmod a file to 777 after
<copy>. When I am using ant in cygwin, after <copy> a bunch of files, then
<chmod>, I can only have 770 no matter what I set the perm in <chmod>. How
can i change all user, group and other's permission after <copy>?
Currently, I can only achieve it by using "cp -r" but this will not work on
DOS environment and thats why i asked the series of questions.
Thanks
Barry
----- Original Message -----
From: "Jack J. Woehr" <ja...@purematrix.com>
To: "Ant Users List" <us...@ant.apache.org>
Sent: Tuesday, March 16, 2004 9:09 PM
Subject: Re: Detecting unix style then choose how to copy files?
> Baz wrote:
>
> > <copy> will work fine but not preserving the permission. <chmod> cannot
> > change modes in dos and cannot change the "others" permission, e.g 777.
What
> > should I do?
> >
> > So I am thinking that if i encounter "unix" style environment, i.e. Unix
and
> > Cygwin, then use "cp -r" otherwise just use the default <copy>.
>
> It's hard to tell from your question just what it is you are trying to
achieve (aside
> from copying files). What permissions do you care about in Cygwin?
>
> --
> Jack J. Woehr # We have gone from the horse and buggy
> Senior Consultant # to the moon rocket in one lifetime, but
> Purematrix, Inc. # there has not been a corresponding moral
> www.purematrix.com # growth in mankind. - Dwight D. Eisenhower
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Detecting unix style then choose how to copy files?
Posted by "Jack J. Woehr" <ja...@purematrix.com>.
Baz wrote:
> <copy> will work fine but not preserving the permission. <chmod> cannot
> change modes in dos and cannot change the "others" permission, e.g 777. What
> should I do?
>
> So I am thinking that if i encounter "unix" style environment, i.e. Unix and
> Cygwin, then use "cp -r" otherwise just use the default <copy>.
It's hard to tell from your question just what it is you are trying to achieve (aside
from copying files). What permissions do you care about in Cygwin?
--
Jack J. Woehr # We have gone from the horse and buggy
Senior Consultant # to the moon rocket in one lifetime, but
Purematrix, Inc. # there has not been a corresponding moral
www.purematrix.com # growth in mankind. - Dwight D. Eisenhower
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org