diff options
author | marcus <marcus@FreeBSD.org> | 2004-01-20 06:35:58 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-01-20 06:35:58 +0800 |
commit | e81aa79e4a512696f031d8878ef6c35f0aa32382 (patch) | |
tree | 516405e2a65c57f3f5e4e1746c8ccb10c6bdd72a /Tools | |
parent | 89e3be499ab6ad449f991decb25f4aed5d79f4da (diff) | |
download | freebsd-ports-gnome-e81aa79e4a512696f031d8878ef6c35f0aa32382.tar.gz freebsd-ports-gnome-e81aa79e4a512696f031d8878ef6c35f0aa32382.tar.zst freebsd-ports-gnome-e81aa79e4a512696f031d8878ef6c35f0aa32382.zip |
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
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/domakedescribe | 19 | ||||
-rwxr-xr-x | Tools/scripts/doportlint | 20 |
2 files changed, 39 insertions, 0 deletions
diff --git a/Tools/scripts/domakedescribe b/Tools/scripts/domakedescribe new file mode 100755 index 000000000000..d45a6cecfd16 --- /dev/null +++ b/Tools/scripts/domakedescribe @@ -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} diff --git a/Tools/scripts/doportlint b/Tools/scripts/doportlint new file mode 100755 index 000000000000..0de9bd4a7570 --- /dev/null +++ b/Tools/scripts/doportlint @@ -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} |