1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00
freebsd-ports/Tools/scripts/doportlint
Joe Marcus Clarke 83c1f7ffe2 Add domakedescribe and doportlint, two scripts that iterate over the ports
tree, and run "make describe" and portlint respectively.  They can be useful
as automated linting tools.

PR:		59226
Submitted by:	linimon
2004-01-19 22:35:58 +00:00

21 lines
567 B
Bash
Executable File

#!/bin/sh
#
indexfile=/usr/ports/INDEX
tmpfile=/tmp/portlint.tmp
#
failures=0
for i in `sed -e "s/ /_/g" ${indexfile}`; do
set $(echo $i | tr \| " ")
port=$2
cd ${port}
portlint > ${tmpfile} 2> /dev/null || failures=$((${failures}+1))
grep '^looks fine\.$' ${tmpfile} > /dev/null 2> /dev/null || \
{ echo '--------------- portlint results for '${port}; \
grep -v '^OK:' ${tmpfile} |\
sed -e 's/^0 fatal errors and //'; }
rm -f ${tmpfile}
done
echo '---------------'
echo 'number of ports with fatal errors in portlint: '${failures}
exit ${failures}