ANNOUNCE: FreeBSD Port Tools 0.20
Jens Rehsack
rehsack at liwing.de
Thu Jul 31 15:52:23 PDT 2003
On 31.07.2003 23:36, Sergei Kolobov wrote:
> On 2003-07-27 at 16:57 +0200, Jens Rehsack wrote:
>> great idea to make such tools public. As long I don't work
>> everytime with cvs but with cvsup, too, I used attached script
>> with a patched send-pr. It seems not so good as yours but it
>> doesn't require "a working copy of the port checked out of CVS".
>> I rank that very high, maybe there is a way to combine both
>> ways.
>
> Thanks for suggestion - I have added a -d <diffmode> option
> in FreeBSD Port Tools 0.25:
>
> -d CVS - diff against CVS (default)
> -d <dir> - diff against Ports tree in <dir> (e.g. /usr/ports)
> -d <pattern> - diff against a port in `pwd`<pattern> (e.g. ".orig")
with pattern in my submit-pr I meant sth. like *openldap*,
what I use to separate my patches from each other, if there're
several per port. Eg. I had a
~/patches/ports/lang/php4/patch-noipv6-Makefile and a
~/patches/ports/lang/php4/patch-openldap-Makefile, both patching
/usr/ports/lang/php4/Makefile and
/usr/ports/lang/php4/scripts/configure.php, but different thing...
To generate a patch from a cvsup'ed tree, I use attached script.
> I hope you can find it useful.
I'm sure I will :-)
I let you know my expiriences.
Jens
-------------- next part --------------
#!/bin/sh
usage()
{
cat <<EOF
Usage $0 [-e <file-expr>] [-l <relative location>]
file-expr expression to identify the modified file, eg. pkg-*
relative
location location relative to current dir to search within
EOF
exit 1
}
newExpr="*"
location=""
while getopts l:e: options
do
case $options in
e)
newExpr=$OPTARG
;;
l)
location=$OPTARG
;;
h)
usage;
break;;
\?)
usage
break;;
esac
done
origExpr=${newExpr}.orig
base=`pwd`/
wd="${base}${location}"
for filename in `find ${wd} -name "${origExpr}"`
do
fn=`echo ${filename}|sed "s|${base}||"`
ofn=`echo ${fn}|sed "s/.orig//"`
echo "Index: ${ofn}"
echo "==================================================================="
echo "diff -u ${fn} ${ofn}"
diff -u ${fn} ${ofn}
done
More information about the freebsd-ports
mailing list