diff mbox

Fix check_GNU_style.sh for BSD / Mac OS X

Message ID D37763B1.F974%alan.hayward@arm.com
State New
Headers show

Commit Message

Alan Hayward June 3, 2016, 3:41 p.m. UTC
check_GNU_style.sh fails to detect lines >80 chars on BSD / Mac OS X
systems.

This is becuase paste is being called with an empty delimiter list.
Instead \0 should be used.

Tested on Ubuntu 14.04 and OS X 10.9.5

contrib/
	* check_GNU_style.sh: Fix paste args for BSD


Alan

Comments

Jeff Law June 9, 2016, 4:32 p.m. UTC | #1
On 06/03/2016 09:41 AM, Alan Hayward wrote:
> check_GNU_style.sh fails to detect lines >80 chars on BSD / Mac OS X
> systems.
>
> This is becuase paste is being called with an empty delimiter list.
> Instead \0 should be used.
>
> Tested on Ubuntu 14.04 and OS X 10.9.5
>
> contrib/
> 	* check_GNU_style.sh: Fix paste args for BSD
OK.
jeff
diff mbox

Patch

diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index 
a7478f8f573132aef5ed1010f0cf5b13f08350d4..87a276c9cf47b5e07c4407f740ce05dce
1928c30 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -191,7 +191,7 @@  col (){
 	# Combine prefix back with long lines.
 	# Filter out empty lines.
 	local found=false
-	paste -d '' "$tmp2" "$tmp3" \
+	paste -d '\0' "$tmp2" "$tmp3" \
 	    | grep -v '^[0-9][0-9]*:+$' \
 	    > "$tmp" && found=true