[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[OT] How to create a 'patch' with full files?



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

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)?

That could be probably done with some piping between diff, awk and cp,
but I don't have the necessary skills for that.

Is there any script already available?

I know I could use a CSV or Subversion to automate this process (and
in fact I use it for other projects), but the production server is out
of my control.

Thanks in advance.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]