NetBSD-Users archive

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

Re: patch backup files



On Thu, Aug 08, 2013 at 11:10:35AM +0200, Ignatios Souvatzis wrote:
> On Wed, Aug 07, 2013 at 04:18:21PM +0100, Patrick Welche wrote:
> > Is there a way of telling patch (or some other equivalent tool) to only
> > create a backup .orig file if one doesn't already exist?
> > 
> > (The use case is apply two patches which both patch the same file, then
> > run mkpatches, which only picks up the second patch as the second invocation
> > of patch changed the .orig file which mkpatches is using as a baseline.)
> 
> The original .orig are moved to .orig.orig, right? In which case
> 
> for f in *.orig.orig; do
>       mv $f $(basename $f .orig)
> done
> 
> does the trick.

Right! P


Home | Main Index | Thread Index | Old Index