diff options
author | Eitan Adler <eadler@FreeBSD.org> | 2018-05-27 05:02:06 +0000 |
---|---|---|
committer | Eitan Adler <eadler@FreeBSD.org> | 2018-05-27 05:02:06 +0000 |
commit | eac1d5f88c83f0f43f47b4bf3c426f28f473eede (patch) | |
tree | 6a0bafd3506ce2239b3d78dd79b39a146ac60c48 /Tools | |
parent | LEGAL: remove ports that been removed (diff) |
Tools: add LEGALlint
This checks 'LEGAL' for common errors, It is inspired by MOVEDLint.
Notes
Notes:
svn path=/head/; revision=470955
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/LEGALlint | 22 | ||||
-rw-r--r-- | Tools/scripts/README | 1 |
2 files changed, 23 insertions, 0 deletions
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 |