1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

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
This commit is contained in:
Joe Marcus Clarke 2004-01-19 22:35:58 +00:00
parent 35f94823a9
commit 83c1f7ffe2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=98607
2 changed files with 39 additions and 0 deletions

19
Tools/scripts/domakedescribe Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
#
indexfile=/usr/ports/INDEX
tmpfile=/tmp/makedescribe.tmp
#
failures=0
for i in `sed -e "s/ /_/g" ${indexfile}`; do
set $(echo $i | tr \| " ")
port=$2
cd ${port}
make describe > /dev/null 2> ${tmpfile} || \
{ failures=$(($failures+1)); \
echo '--------------- make describe failed for '${port}':'; \
cat ${tmpfile}; }
rm -f ${tmpfile}
done
echo '---------------'
echo 'Total number of ports that failed trying to build /usr/ports/INDEX: '${failures}
exit ${failures}

20
Tools/scripts/doportlint Executable file
View File

@ -0,0 +1,20 @@
#!/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}