Forum: Ruby copying changed files in a tree

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2007-02-05 10:09
(Received via mailing list)
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
5a837592409354297424994e8d62f722?d=identicon&s=25 Ryan Davis (Guest)
on 2007-02-05 10:27
(Received via mailing list)
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.
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2007-02-05 13:23
(Received via mailing list)
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
E0d864d9677f3c1482a20152b7cac0e2?d=identicon&s=25 Robert Klemme (Guest)
on 2007-02-05 13:50
(Received via mailing list)
On 05.02.2007 13:22, Martin DeMello wrote:
> 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
This topic is locked and can not be replied to.