Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2007 13:48:11 +1000
From:      Edwin Groothuis <edwin@mavetju.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: Generating patch files
Message-ID:  <20070620034811.GA1558@k7.mavetju>
In-Reply-To: <E1I0o0k-0005n1-Sk@a-traxx.reactor.local>
References:  <E1I0o0k-0005n1-Sk@a-traxx.reactor.local>

next in thread | previous in thread | raw e-mail | index | archive | help

--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jun 20, 2007 at 02:25:20AM +0200, Steffen Beyer wrote:
> Is there an easy way to create this set of files, i.e. cutting the patch
> into pieces and naming the files accordingly? I looked through the
> handbook and various tools, but couldn't find the right one.

Make sure that the directory files exist, Go to the ${WRKSRC}, and
run "makediff path/and/file.extension"

Edwin
-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/

--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=makediff

#!/bin/sh

filename=$1
filesdir=../../files

if [ -z "`echo ${filename} | grep _`" ]; then
    patchfile="${filesdir}/patch-`echo ${filename} | sed -e 's/\//__/g'`"
else
    patchfile="${filesdir}/patch-`echo ${filename} | sed -e 's/\//_/g'`"
fi

test -f ${filename}.orig || cp ${filename} ${filename}.orig 
vi ${filename}

p=`grep -l " ${filename}	" ${filesdir}/*`
test ! -z "${p}" && patchfile=${p}

diff -u ${filename}.orig ${filename} > ${patchfile}
echo "Saving diff to ${patchfile}"

--+HP7ph2BbKc20aGI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070620034811.GA1558>