On Friday 30 June 2006 10:06, Rumen Yotov wrote: > Hope i didn't screwed something so check it again (some things might be > made shorter though).
I have a neat little script for this: ###################################################### #!/bin/bash # collect vars ebuild=`equery which $1` patch=$2 category=`echo ${ebuild} | awk -F/ '{cat=NF-2;print $cat}'` package=`echo ${ebuild} | awk -F/ '{pkg=NF-1;print $pkg}'` portagepath=`dirname ${ebuild}` overlaypath=/usr/local/portage/${category}/${package} # copy to overlay mkdir -pv ${overlaypath}/local-files cp -v ${ebuild} ${overlaypath}/ ln -sv ${portagepath}/files ${overlaypath}/files cp -v ${patch} ${overlaypath}/local-files/ # print instructions - wait for acknowledgement - edit file echo -e 'Insert:\n\tepatch ${FILESDIR/files/local-files}/'${patch}'\nin src_unpack{ }' read ${EDITOR} ${overlaypath}/${ebuild##*/} # digest ebuild ebuild ${overlaypath}/${ebuild##*/} digest ###################################################### This only copies the newest ebuild and makes a symlink to the filesdir in /usr/portage so that patches in portage do not have to be copied... The first argument must be the name of the package in a format that `equery which` understands and the second argument must be the path to the patch that needs to be applied. -- Bo Andresen
pgpO9XZdLVJQV.pgp
Description: PGP signature