소스 검색

Paul Brook writes: filter .svn dirs to greatly speed up the file grep test

Mike Frysinger 17 년 전
부모
커밋
f211204dd3
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      test/build/check_config_options.sh

+ 6 - 5
test/build/check_config_options.sh

@@ -4,14 +4,15 @@ ret=0
 
 # Make sure nothing uses the ARCH_HAS_MMU option anymore
 result=$(
-grep -rsHI \
-	__ARCH_HAS_MMU__ ../.. \
+find ../.. \
 	| grep -v \
 		-e include/bits/uClibc_config.h \
-		-e test/build/check_config_options.sh \
-		-e /.svn/
+		-e /test/ \
+		-e /.svn/ \
+	| xargs grep -sHI \
+		__ARCH_HAS_MMU__
 )
-if test -n "$result" ; then
+if [ -n "$result" ] ; then
 	echo "The build system is incorrectly using ARCH_HAS_MMU:"
 	echo "$result"
 	ret=1