  | |  | How to create a 'patch ' with full files? | How to create a 'patch ' with full files? 2005-07-25 - By Garrick Staples
Back On Mon, Jul 25, 2005 at 03:45:43PM +0200, wolf2k5 alleged: > 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 > > Then I manually copy the modified files (preserving the directory > structure) into a new directory, create a tar archive and send it to > the system administrator for deployment on production server. > > Is there any way to automate the last step of this process (figuring > out the modified files and putting them in a directory)?
tar has a handy -T option, which can read a list of files to include in a new tarball. It can even read this list from stdin: diff ... | awk ... | tar cvf foo.tar -T -
Also note find's -cnewer and tar's --newer-mtime options.
-- Garrick Staples, Linux/HPCC Administrator University of Southern California
-- Taroon-list mailing list Taroon-list@(protected) http://www.redhat.com/mailman/listinfo/taroon-list
Earn $52 per hosting referral at Lunarpages.
|
|
 |