From 3a5f89705564f1929369307b90f98ddc2aa39fcc Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 19 Mar 1998 01:08:19 +0000 Subject: [PATCH] lilypond-0.1.49 --- bin/wild-perl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 bin/wild-perl diff --git a/bin/wild-perl b/bin/wild-perl new file mode 100644 index 0000000000..83c2c82966 --- /dev/null +++ b/bin/wild-perl @@ -0,0 +1,34 @@ +# -*- perl -*- +##! @PERL@ + +@ignorestuff = (); + +sub ignore_query +{ + my ($testfile) = @_; + return !grep(/$testfile/, @ignorestuff); +} + +while (<>) { + $line = $_; + if ($line =~ /^ *nowildcard: *(.*)$/) { + $ignore = $1; + @ignorelist = split (/ +/, $ignore); + foreach $i (@ignorelist) { + print "# ignoring wildcards for \`$i\'\n"; + push @ignorestuff, $i; # concat ? uh? + } + + + } elsif ($line =~ /(.*)\$\(wildcard(.*)\)(.*)/) { + $wild = $2; + + @expanded = glob ($wild); + + @expanded = grep {ignore_query($_);} @expanded; + + print $1 . join (' ', @expanded) . $3 . "\n"; + } else { + print $line; + } +} -- 2.39.5