diff --git a/Tools/scripts/LEGALlint b/Tools/scripts/LEGALlint new file mode 100755 index 000000000000..99ee9b2101d8 --- /dev/null +++ b/Tools/scripts/LEGALlint @@ -0,0 +1,22 @@ +#!/bin/sh +# $FreeBSD$ + +PORTSDIR="${PORTSDIR:-/usr/ports}" + +cd "$PORTSDIR" || exit 1 + +export IFS="${IFS}:" +grep -nv '#' "$PORTSDIR/LEGAL" | while read -r line _ port text +do + if [ ! -d "$port" ] + then + printf "%d (%s): port has been removed\\n" "$line" "$port" + continue + fi + + actual_text="$(make -C "$port" -VLEGAL)" + if [ "$text" != "$actual_text" ] + then + printf "%d (%s): reason mismatch\\n" "$line" "$port" + fi +done diff --git a/Tools/scripts/README b/Tools/scripts/README index a93227f826cd..280aef64eb59 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -6,6 +6,7 @@ NOTE: These scripts need work and are *NOT* safe to use unless you know script. MOVEDlint.awk - checks MOVED for common errors +LEGALlint - checks LEGAL for common errors ardiff - compare two archives easily addport - replacement for easy-import bad-pkgdescrs.sh - locate identical pkg descriptions