5 # Similiar to the diff(1) command.
6 # This one automatically ignores any autogenerated files.
11 use File::Basename; # &dirname
12 require "".dirname($0)."/My-KernelIgnoreList.pm";
14 # Do not use the shell here as it tries to expand the argument wildcards.
16 # Prevent: Name ... used only once: possible typo
17 1 if @My::KernelIgnoreList::list;
18 open DIFF,"-|","diff","-ru",
19 map(("-x",$_),@My::KernelIgnoreList::list),
21 or die "Cannot open the 'diff' output: $!";
23 next if /^Binary files /;
27 # It is valid for diff(1) to return its exit code 1.
28 if (close DIFF && $?!=256) {
29 die "Cannot close the 'diff' output (status=$?): $!";