#!/bin/sh # # Send back NetBSD patches # PKGSRCBASE=/usr/pkgsrc pkg_f=$1 to=$2 if [ "$pkg_f" = "." ] then pkg_f=`pwd` fi if [ "$pkg_f" = "" ] then echo "Usage: $0 category/pkg [maintainer@software.org]" exit 1 fi pkg=`echo $pkg_f | sed -e 's,.*/pkgsrc/,,' -e 's,/$,,'` cd $PKGSRCBASE/$pkg if [ ! -d patches -o `ls patches 2>/dev/null | grep -v orig | grep -v BAK | wc -l` -eq 0 ] then echo '***' Package $pkg has no patches, exiting. exit 0 fi pkgname=`make show-var VARNAME=PKGNAME | sed -e 's,nb.*$,,'` tmp=`mktemp -t feedback-patches` ( cat <$tmp if [ "$to" = "" ] then cat $tmp rm $tmp else echo Mailing patches for $pkgname... cat $tmp | mail -v -s "Patches for $pkgname" $to rm $tmp echo done. fi