[gst-cvs] common: check: Switch CRLF line ending check to use perl

Jan Schmidt thaytan at kemper.freedesktop.org
Tue May 26 03:29:26 PDT 2009


Module: common
Branch: master
Commit: c57272152d5c40617fab305d839db1b1fefe0ea0
URL:    http://cgit.freedesktop.org/gstreamer/common/commit/?id=c57272152d5c40617fab305d839db1b1fefe0ea0

Author: Jan Schmidt <jan.schmidt at sun.com>
Date:   Tue May 26 11:22:55 2009 +0100

check: Switch CRLF line ending check to use perl

Apparently only GNU file differentiates between text files with different
line ending styles, so this test breaks on Solaris. Use a small perl
fragment instead.

---

 win32.mak |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/win32.mak b/win32.mak
index e5192b9..d9964a3 100644
--- a/win32.mak
+++ b/win32.mak
@@ -24,7 +24,8 @@ win32-check-crlf:
 	@echo Checking win32 files for CR LF line endings ...; \
 	fail=0 ; \
 	for each in $(win32crlf) ; do \
-	  if ! (file $$each | grep CRLF >/dev/null) ; then \
+	  result=`perl -e 'print grep(/\r\n/,<>)' "$$each" | wc -l`; \
+	  if test "$$result" = 0 ; then \
 	    echo $$each must be fixed to have CRLF line endings ; \
 	    fail=1; \
 	  fi ; \





More information about the Gstreamer-commits mailing list