mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-10 02:21:15 +02:00
23 lines
502 B
Bash
Executable File
23 lines
502 B
Bash
Executable File
#!/bin/sh
|
|
# $FreeBSD: head/Tools/scripts/LEGALlint 470955 2018-05-27 05:02:06Z eadler $
|
|
|
|
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
|