$ cd /home/user
$ diff -Naur OriginalFolder/ ModifiedFolder/ > MyPatch.patch
$ cd /home/user/OriginalFolder
$ patch -p1 < ../MyPatch.patch
Blender,3D,Quandtum,Modelling,Texturing,Animation,Rigging,Skinning,Linux,Ubuntu,C/C++
To produce a patch from the command line in Linux, it is important to have both the original and modified folders setup at the same directory level. For example, two folders "/home/user/OriginalFolder" and "/home/user/ModifiedFolder". We will first change into the folder that contains the folders that we are patching, for our example this would be as follows: $ cd /home/user Now to produce a patch named "MyPatch.patch" we would issue the following command: $ diff -Naur OriginalFolder/ ModifiedFolder/ > MyPatch.patch The patch will now contain all of the difference information and act as an instruction on how to produce ModfiedFolder from the OriginalFolder. If we want to apply this patch (say for example to the "OriginalFolder", we would first need to change in to the path of the source that we are going to patch and apply the patch as follows: $ cd /home/user/OriginalFolder If you now compare the "OriginalFolder" to the "ModifiedFolder" there should be no differences. Congratulations, you have just created and applied your first patch.
1 Comment
6/25/2012 06:23:21 pm
Loved your blog layout that I created a weebly account too.
Reply
Your comment will be posted after it is approved.
Leave a Reply. |
Categories
All
Archives
January 2015
Jeremy Quandt
(aka. Quandtum) “Live as if you were to die tomorrow. Learn as if you were to live forever.”
|