From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CKUqD4+HBGGfFAEAgWs5BA (envelope-from ) for ; Sat, 31 Jul 2021 01:13:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SCjfCo+HBGFxRwAA1q6Kng (envelope-from ) for ; Fri, 30 Jul 2021 23:13:19 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E6FF618876 for ; Sat, 31 Jul 2021 01:13:18 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0F048291FD; Fri, 30 Jul 2021 19:13:15 -0400 (EDT) X-Greylist: delayed 2474 seconds by postgrey-1.36 at nmbug; Sat, 13 Feb 2021 14:16:38 EST Received: from mslow2.mail.gandi.net (mslow2.mail.gandi.net [217.70.178.242]) by mail.notmuchmail.org (Postfix) with ESMTPS id DC4CA1FBB5 for ; Sat, 13 Feb 2021 14:16:38 -0500 (EST) Received: from relay4-d.mail.gandi.net (unknown [217.70.183.196]) by mslow2.mail.gandi.net (Postfix) with ESMTP id 2CF8E3ABE6A for ; Sat, 13 Feb 2021 18:24:14 +0000 (UTC) X-Originating-IP: 24.113.169.116 Received: from matts-mbp-2016.lan (24-113-169-116.wavecable.com [24.113.169.116]) (Authenticated sender: matt@rfc20.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BCD14E0002; Sat, 13 Feb 2021 18:23:47 +0000 (UTC) From: Matt Armstrong To: notmuch@notmuchmail.org Subject: [PATCH] Fix author-scan.sh on BSD systems. Date: Sat, 13 Feb 2021 10:22:43 -0800 Message-Id: <20210213182243.94288-1-matt@rfc20.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-MailFrom: matt@rfc20.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 Message-ID-Hash: ZJB6FAYGOHQQNGAZ6YKU6R77OFSOD76O X-Message-ID-Hash: ZJB6FAYGOHQQNGAZ6YKU6R77OFSOD76O X-Mailman-Approved-At: Fri, 30 Jul 2021 23:13:14 -0400 CC: Matt Armstrong X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627686799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=VEwvHlNIZbgGoGxzgcs8HsU9YCdPQqthFUtx/+fsg9Y=; b=VpGKfM/y2/U9i0XfvkuhTmLig8Td1R8fHm1XO5CHqgBLEziMRKydxoAq3iqJXA5ckBa5uA EjJlw8MSTqkHiNuwNUuDTvBCz+B5aFMsyWjoPTS4P8HWG3Wp8cn2srdrwrWafrmhqPpant bg/BwcRIU5/EiGbM8681kja61r4FyYWKCFN+sjexO8NBPSGprxkLjp+yxnhs47oxBYN7sT veQ3sfU3wFgted5TJVTHxksD5iq+qjBBMoDccStRWOIcHmkDpJMwsnsXlppyVrdGEpAqvG Nz8ySagRWiX6KHWTMW01ykK0DjzJrmyFv9tBylgf9DZtGBP2cQV0JrGTJF9j5g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627686799; a=rsa-sha256; cv=none; b=GSP1Gh15DVG0xqwc015byJx7ijnXZI2iX7lAxarxNv8VJI6seU5ylJQACbfPaUIueS5erp yb8Cz0FX1eEynJhN5YkZr1SxwPLE7jx18OXuXN7KtVPr0lGGfqc/q4JWsF/UtHHinOcTBA yl7dM5TNxilqp+1zrBauiKQ3w84hCVB5S3dvfu8YFmcXIyPn0Tcac+lnUxE7GZlR//mo3x 2LU/JmZ8hwOIWjuKXEli87hrjDI+wFGRn/52/QxQODWI+LvIsBUp6xyZ+irfjWRXjPdOzM pukaTk0DLT83EXMW4Y5Ll9c6eyVB+7Hd0cvpgY8L0fDK02pzuIh2J7OwlNgLSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.01 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E6FF618876 X-Spam-Score: -0.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ddzy+luwdjCk 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. --- devel/author-scan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.0