On 10/26/10 22:44, Bruce Dubbs wrote:
> Drew Ames wrote:
>
>> Now I have another question. How do I make the patch in the link above
>> into a .patch file that I can apply?
>>
>> Do I fill out the Submitted By, Date, Initial Package Version,
>> Upstream Status, Origin, and Description, at the top, paste in the
>> information from the link starting at the line with the diff command,
>> and then give it all a .patch extension?
> You need an original and a modified version:
>
> diff -u modified orig> name.patch
>
> Then edit the patch to add the other info at the top. The 'orig' and
> 'modified' are generally the package top level directory as in:
>
> orig:
> file.c
>
> modified:
> file.c
>
> -- Bruce
Here's a helper
#!/bin/sh
# $Knoppix: localtools/usr/local/bin/mkpatch,v 1.2 2007-01-10 19:35:05
# bsd Exp $
#
# mkpatch -- creates unified patch files for diff in given 2 files and,
# or directories, also cares which one is newer :)
#
# see also diff(1) and patch(1)
#
prog=`basename $0`
if [ $# -lt 2 ]; then
echo "Invalid argc $#" 1>&2
echo "usage: $prog <filename1> <filename2>" 1>&2
exit 1
fi
if [ "$1" -nt "$2" ]; then
new="$1"
old="$2"
else
new="$2"
old="$1"
fi
patch="`basename $new`.patch"
LC_ALL=C TZ=UTC0 diff -Naur $old $new >$patch
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page