aboutsummaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorMatt Armstrong <matt@rfc20.org>2021-02-13 10:22:43 -0800
committerDavid Bremner <david@tethera.net>2021-08-03 20:26:36 -0300
commit5734d8bd3220c99972290949c204091116c8b200 (patch)
treef328bc36507a5ecce315a1e08d20845b028f8950 /devel
parent8908779999dbf6f2c6338f492950bb576bb6b5dd (diff)
Fix author-scan.sh on BSD systems.
BSD xargs does not have the -d option. Here we use tr to convert newlines to NUL characters, then pass -0 to xargs (which BSD does support). I looked at passing -z to 'git ls-files', but I did not find a BSD grep option to turn on NUL deliminted line processing.
Diffstat (limited to 'devel')
-rw-r--r--devel/author-scan.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/devel/author-scan.sh b/devel/author-scan.sh
index 2d9c4af8..23854f39 100644
--- a/devel/author-scan.sh
+++ b/devel/author-scan.sh
@@ -5,7 +5,7 @@ AUTHOR_EXCLUDE='uncrustify'
# based on the FSF guideline, for want of a better idea.
THRESHOLD=15
-git ls-files | grep -v -e "$FILE_EXCLUDE" | xargs -n 1 -d \\n \
+git ls-files | grep -v -e "$FILE_EXCLUDE" | tr '\n' '\0' | xargs -0 -n 1 \
git blame -w --line-porcelain -- | \
sed -n "/$AUTHOR_EXCLUDE/d; s/^[aA][uU][tT][hH][Oo][rR] //p" | \
sort -fd | uniq -ic | awk "\$1 >= $THRESHOLD" | sort -nr