Re: amber-developers: Re: PMEMD 10 patch 2

From: David A. Case <case.biomaps.rutgers.edu>
Date: Fri, 3 Oct 2008 10:21:46 -0400

On Fri, Oct 03, 2008, Gustavo Seabra wrote:

> > Does anyone know how to make a patch file that adds a file (rather than
> > updating an existing file?)
>
> I think that's useful for everyone here:
>
> You can create a patch that creates a new file by diffing the
> /dev/null with the file you want to create. For example:
>
> $ mkdir test
> $ cd test
> $ echo "this is the test file" > test_file
> $ diff -Naur /dev/null test_file > patch1

Just a note: this seems to work on Linux but not on cygwin. It could be that
cygwin's handling of /dev/null is not really compatible with Linux/POSIX.
Or maybe some problem with its patch.

Note that Voldymyr's proposed solution also fails on cygwin. As with
Gustavo's proposal, patch just says "can't file file to patch..." when it sees
either /dev/null or a nonexistent file name.

Cygwin's patch version is 2.5.8, whereas my Linux boxes seem to have 2.5.4.
Not sure if this is relevant or not.

...dac
Received on Sun Oct 05 2008 - 05:07:49 PDT
Custom Search