[Linux-disciples] patch(1)

Adam Rosi-Kessel adam at rosi-kessel.org
Thu Jun 29 09:40:08 EDT 2006


Stephen R Laniel wrote:
> On Wed, Jun 28, 2006 at 08:50:04PM -0400, Adam Rosi-Kessel wrote:
>> Why doesn't it work? What happens? I would break it down into diff >
>> file, and then patch -p1 file. It may just be a path/depth issue.
> 
> Sorry; I've been rather vague in the descriptions because I
> figured this was all very trivial stuff that someone could
> correct without much detail. If you do
> 
> diff -u -r [dir1] [dir2] | patch -b -p1 [dir3] -
> 
> you get an error that [dir3] is a directory, which is
> exactly true.

What I always do is:

cd ~/code
diff -u -r old_version old_patched_version > p.diff
cd new_version
cat ../p.diff | patch -p1


More information about the Linux-disciples mailing list