[clue] Rake (Ruby) question posted... any experts here?
David L. Anselmi
anselmi at anselmi.us
Tue Dec 6 19:08:44 MST 2011
Lorin Ricker wrote:
> Are there any Rake/Ruby experts here in CLUE who'd be willing to look at
> the above posting and give my question/problem a shot?
I don't know anything about rake so I have some questions about the code. If they're worth
answering maybe that will help.
tarDir = File.join BUPDIR, tarDirSuffix
directory tarDir
What's "directory tarDir" and why does it come after the assignment?
desc "Backup #{fn} to .../#{tarDirSuffix}"
What does this do? It (and the lines after) doesn't seem to run. Is that a hint?
file tar => [src] do |t|
This seems badly formed. tar seems to be a variable containing the full path to the backup file.
src seems to be a variable containing the path to the source file. What's file? Does it make sense
to say "file => [src]"?
So I think your problem is not in the "is the file newer" logic but in your "file tar ..." loop.
HTH,
Dave
More information about the clue
mailing list