help-tar
[Top][All Lists]
Advanced

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

Re: [Help-tar] [PATCH] Add --clamp-mtime option


From: Paul Eggert
Subject: Re: [Help-tar] [PATCH] Add --clamp-mtime option
Date: Thu, 04 Jun 2015 12:24:03 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 06/04/2015 08:59 AM, Jérémy Bobbio wrote:
BUILD_DATE="Mon, 01 Jun 2015 18:11:50 +0200"

Yes, that's the hassle I was referring to. Something has to keep track of BUILD_DATE and update it when appropriate. It would be better if this were automated somehow. (Sorry, I don't have an answer here, just pointing out the problem.)

we currently do:

     find "$DIR" -newermt "$BUILD_DATE' -print0 | \
         xargs -0r touch --no-dereference --date="$BUILD_DATE"
     tar -cf archive.tar "$DIR"

And with the `--clamp-mtime` option, we could replace the last lines by:

     tar -cf archive.tar --mtime="$BUILD_DATE" --clamp-mtime "$DIR"

Bonus: actual file metadata are not altered.

OK, but it sounds like you have something working now, and here the bonus (actual file metadata not altered) is reasonably minor, so the argument for adding this new feature to tar is relatively weak.



reply via email to

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