From: fred Date: Thu, 19 Mar 1998 01:08:19 +0000 (+0000) Subject: lilypond-0.1.49 X-Git-Tag: release/1.5.59~5983 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3a5f89705564f1929369307b90f98ddc2aa39fcc;p=lilypond.git lilypond-0.1.49 --- 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; + } +}