dotfiles/.bin/port-diff
2024-10-20 07:57:26 +02:00

12 lines
275 B
Bash
Executable File

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