Skip to content

Commit

Permalink
[PATCH] headers_check: improve #include regexp
Browse files Browse the repository at this point in the history
The following combinations of pp-tokens are used

	#include
	 #include
	# include

so, script'd better check for all of them.

Signed-off-by: Alexey Dobriyan <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Sep 13, 2006
1 parent 354332e commit 120e2a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/hdrcheck.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

for FILE in `grep '^#include <' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do
for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do
if [ ! -r $1/$FILE ]; then
echo $2 requires $FILE, which does not exist
exit 1
Expand Down

0 comments on commit 120e2a9

Please sign in to comment.