1#!/bin/sh
2#
3indexfile=/usr/mports/INDEX-4
4tmpfile=/tmp/portlint.tmp
5#
6failures=0
7for i in `sed -e "s/ /_/g" ${indexfile}`; do
8  set $(echo $i | tr \| " ")
9  port=$2
10  cd ${port}
11  portlint > ${tmpfile} 2> /dev/null || failures=$((${failures}+1))
12  grep '^looks fine\.$' ${tmpfile} > /dev/null 2> /dev/null || \
13  { echo '--------------- portlint results for '${port}; \
14  grep -v '^OK:' ${tmpfile} |\
15  sed -e 's/^0 fatal errors and //'; }
16  rm -f ${tmpfile}
17done
18echo '---------------'
19echo 'number of ports with fatal errors in portlint: '${failures}
20exit ${failures}
21