  | |  | How to create a 'patch ' with full files? | How to create a 'patch ' with full files? 2005-07-25 - By Ben Fitzgerald
Back On Mon, Jul 25, 2005 at 03:45:43PM +0200, wolf2k5 wrote: > Hi all, > > I apologize for the OT, but I didn't know any other place to send this > message to. > > I am looking into an automated way to create a 'patch' including > *only* the modified files, instead of the usual diff output, on Linux > and Mac OS X. > > Let me make an example. > > I developed a web application. > > The production server is out of my control and the only way to apply > changes to the web application is to send a tar archive containing > *only* the modified files to the system administrator. > > So, when I need to apply some changes to the web application, I copy > all the files (preserving the directory structure) to a new directory > and edit the files. > > When I am finished with the modifications, I issue a recursive "diff" > to get a list of the modified files, e.g.: > > # diff -q -r rev0 rev1 > Files rev0/subdir/license.txt and rev1/subdir/license.txt differ > Files rev0/test.txt and rev1/test.txt differ
if you must produce a tarball (instead of creating a patch with diff):
diff -q -r rev0 rev1 | cut -f4 -d' ' | xargs tar cf mytarball.tar
hth,
ben.
-- Registered Linux user number 339435
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |