quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] Another shell re-write of backup-files.


From: Kaz Kylheku
Subject: Re: [Quilt-dev] Another shell re-write of backup-files.
Date: Fri, 18 Mar 2011 13:58:11 -0700
User-agent: Roundcube Webmail/0.4

On Fri, 18 Mar 2011 21:27:00 +0100, Jean Delvare <address@hidden>
wrote:
> I would have sent it already if I didn't spend time today answering your 
> e-mails and reviewing your code :p

:)

But this is fun and you don't often get to write shell
code that is so closely tied to filesystem semantics.

>> Breaking hard links is done easily using an in-place sed (sed -i):
>>
>>   find "$opt_prefix" -type f -links +1 | xargs sed -i -s ''
> 
> Except that it doesn't do what you want. What the script must do when 
> passed -L alone is to break links on _original_ files, not _backed up_ 
> files.

Ah yes, because we would like the restored files
in the tree to have a new modification time.
A restored file must be newer so that that its dependent
objects are rebuilt by a timestamp-based build
system such as Make.

That's how I had it coded at first, argh. Then, in a fit of silliness,
I "simplified" it, forgetting about the time stamp.

  ( cd "$opt_prefix" ; find . -type f -links +1 ) | xargs sed -i s ''

Oops!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]