diff options
author | rillig <rillig@pkgsrc.org> | 2020-05-04 21:48:18 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-05-04 21:48:18 +0000 |
commit | 10662270495a14fa1e6b82722c63da30ce898b69 (patch) | |
tree | 90cb8008e2ce8860e78649b92ad2250b9965481d /mk/check | |
parent | 2a65548e361e75466a34b54e80f9b0509e39c676 (diff) | |
download | pkgsrc-10662270495a14fa1e6b82722c63da30ce898b69.tar.gz |
mk/check/check-portability: fix error message when no patches are found
Diffstat (limited to 'mk/check')
-rw-r--r-- | mk/check/check-portability.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/check/check-portability.sh b/mk/check/check-portability.sh index 87cf1461501..8e915382df1 100644 --- a/mk/check/check-portability.sh +++ b/mk/check/check-portability.sh @@ -1,4 +1,4 @@ -# $NetBSD: check-portability.sh,v 1.20 2020/05/04 21:32:48 rillig Exp $ +# $NetBSD: check-portability.sh,v 1.21 2020/05/04 21:48:18 rillig Exp $ # # This program checks all files in the current directory and any # subdirectories for portability issues that are likely to result in @@ -34,7 +34,16 @@ check_shell() { fi } -patched_files=",$(awk 'BEGIN { ORS = "," } /^\+\+\+ / { print $2 }' "$PATCHDIR"/patch-*)," +patched_files=",$(awk ' + BEGIN { + if (ARGV[1] ~ /\/patch-\*$/) + exit; + ORS = "," + } + /^\+\+\+ / { + print $2 + }' \ + "$PATCHDIR"/patch-*)," find ./* -type f -print 2>/dev/null \ | sed 's,$,_,' \ |