From: Luis R. Rodriguez Date: Fri, 18 Sep 2009 19:49:26 +0000 (-0700) Subject: checkincludes.pl: provide usage helper X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=f9d490ab374236a115440c771ecf0fb2890eb929;p=linux-edison.git checkincludes.pl: provide usage helper Signed-off-by: Luis R. Rodriguez Signed-off-by: Andrew Morton Signed-off-by: Sam Ravnborg --- diff --git a/scripts/checkincludes.pl b/scripts/checkincludes.pl index 32ebff659fc..4bff13985eb 100755 --- a/scripts/checkincludes.pl +++ b/scripts/checkincludes.pl @@ -3,6 +3,15 @@ # checkincludes: Find files included more than once in (other) files. # Copyright abandoned, 2000, Niels Kristian Bech Jensen . +sub usage { + print "Usage: checkincludes.pl \n"; + exit 1; +} + +if ($#ARGV < 0) { + usage(); +} + foreach $file (@ARGV) { open(FILE, $file) or die "Cannot open $file: $!.\n";