How To Create A Patch For Updated Script

Recently I had to make few changes on a freely distributed CGI script. We do these changes to fix bugs or add useful features.

We use patch files to share those changes with other developers and those patches are useful to re-apply them to new versions of the script.

The package we use for this is ‘diff’. You can learn more about it from ‘man diff’ and play with it.

This is the command I use to generate patch files:

diff -crB original_file updated_file > file.patch



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: