[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[help-GIFT] how to patch
From: |
Wolfgang Mueller |
Subject: |
[help-GIFT] how to patch |
Date: |
Fri, 16 Feb 2001 11:21:09 +0100 (CET) |
Due to popular demand, how to use patch and diff:
Consider the files:
from, containing
this line will be kept 1
this line will be kept 2
this line will be kept 3
this line will be deleted
this line will be kept 4
to, containing
this line will be kept 1
this line will be kept 2
this line will be kept 3
this line will be kept 4
this line has been added
diff -c from - < to > patch
(The -c is important, see manpage, it gives the context to patch to
decide if the file has been patched already etc. and it gives me the
context which file to patch)
will generate the file patchtest
*** from Fri Feb 16 11:09:29 2001
--- - Fri Feb 16 11:16:28 2001
***************
*** 1,5 ****
this line will be kept 1
this line will be kept 2
this line will be kept 3
- this line will be deleted
this line will be kept 4
--- 1,5 ----
this line will be kept 1
this line will be kept 2
this line will be kept 3
this line will be kept 4
+ this line has been added
\ No newline at end of file
now you can use it doing
patch < patch
after that "from" will be exactly equal to "to"
If you try a second time
patch < patch
you will get an error message telling you, that the to is already
patched and you get the choice to revert the patch.
Cheers,
Wolfgang
--
Wolfgang Müller,
assistant-doctorant == PhD student (2001), teaching assistant
Personal page: http://cui.unige.ch/~vision/members/WolfgangMueller.html
Maintainer, GNU Image Finding Tool (http://www.gnu.org/software/gift)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [help-GIFT] how to patch,
Wolfgang Mueller <=