> I agree that this error shouldn't be fatal in case that variable is > set, but there should still be a warning. > > Additionally, the variable test should exists() as well as length() to > avoid a Perl warning when the variable is not defined at all. (find- > dups gets away with this because the embedded Perl script does not > enable warnings.) > > Ben.
How about the following?
...Juerg
diff --git a/commands/preprocess b/commands/preprocess
index 045903b..37b8e67 100755
--- a/commands/preprocess
+++ b/commands/preprocess
@@ -35,9 +35,12 @@ sub expandwildcards {
if (! -d "$moddir/$subdir") {
if (-d "$moddir/kernel/$subdir") {
$subdir = "kernel/$subdir";
- } elsif ($checkdir) {
- die "pattern $pattern refers to nonexistent
subdirectory";
} else {
+ if ($checkdir) {
+ print STDERR "missing module directory
$pattern\n";
+ die if
!(exists($ENV{KW_CHECK_NONFATAL}) &&
+
length($ENV{KW_CHECK_NONFATAL}));
+ }
return ();
}
}
signature.asc
Description: OpenPGP digital signature

