#!/bin/sh -x pwd | fgrep -q '/usr/ports/' || return 1 set -A N $(make show="PKGNAME EPOCH REVISION") PN="${N[0]}${N[1]:+v${N[1]}}${N[2]:+p${N[2]}}" PD=$(pwd | cut -d"/" -f4,5) cd /usr/ports cvs -d $CVSROOT diff -uNp "${PD}" > ~sdk/Diffs/${PN}.diff echo ~/Diffs/${PN}.diff