[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

copying changed files in a tree

Martin DeMello

2/5/2007 9:08:00 AM

Do any of the ruby build tools (rake, rant, somethingelse?) support
the task "copy all the files that have changed since the last time i
ran the copy task" across an entire directory tree? e.g. if I have the
structure

foo/
foo/file1
foo/file2
foo/bar/
foo/bar/file3

the first time i run rake copy, it should copy the entire tree over.
Now say I touch foo/bar/file3, and rerun rake copy, it should only
copy that file over.

martin

3 Answers

Ryan Davis

2/5/2007 9:26:00 AM

0


On Feb 5, 2007, at 1:08 AM, Martin DeMello wrote:

> Do any of the ruby build tools (rake, rant, somethingelse?) support
> the task "copy all the files that have changed since the last time i
> ran the copy task" [...]

use rsync. it rules.


Martin DeMello

2/5/2007 12:23:00 PM

0

On 2/5/07, Ryan Davis <ryand-ruby@zenspider.com> wrote:
>
> On Feb 5, 2007, at 1:08 AM, Martin DeMello wrote:
>
> > Do any of the ruby build tools (rake, rant, somethingelse?) support
> > the task "copy all the files that have changed since the last time i
> > ran the copy task" [...]
>
> use rsync. it rules.

good point :) i was trying too hard for a pure ruby solution.

martin

Robert Klemme

2/5/2007 12:47:00 PM

0

On 05.02.2007 13:22, Martin DeMello wrote:
> On 2/5/07, Ryan Davis <ryand-ruby@zenspider.com> wrote:
>>
>> On Feb 5, 2007, at 1:08 AM, Martin DeMello wrote:
>>
>> > Do any of the ruby build tools (rake, rant, somethingelse?) support
>> > the task "copy all the files that have changed since the last time i
>> > ran the copy task" [...]
>>
>> use rsync. it rules.
>
> good point :) i was trying too hard for a pure ruby solution.

GNU cp also has some nice options to deal with this (from memory, -a and
-u).

Kind regards

robert