dotfiles/.bin/port-diff

12 lines
275 B
Plaintext
Raw Normal View History

#!/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