Date: Sun, 27 May 2018 05:02:06 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470955 - head/Tools/scripts Message-ID: <201805270502.w4R5268a056655@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Sun May 27 05:02:06 2018 New Revision: 470955 URL: https://svnweb.freebsd.org/changeset/ports/470955 Log: Tools: add LEGALlint This checks 'LEGAL' for common errors, It is inspired by MOVEDLint. Added: head/Tools/scripts/LEGALlint (contents, props changed) Modified: head/Tools/scripts/README Added: head/Tools/scripts/LEGALlint ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Tools/scripts/LEGALlint Sun May 27 05:02:06 2018 (r470955) @@ -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 Modified: head/Tools/scripts/README ============================================================================== --- head/Tools/scripts/README Sun May 27 04:43:37 2018 (r470954) +++ head/Tools/scripts/README Sun May 27 05:02:06 2018 (r470955) @@ -6,6 +6,7 @@ NOTE: These scripts need work and are *NOT* safe to us 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805270502.w4R5268a056655>