]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.49
authorfred <fred>
Thu, 19 Mar 1998 01:08:19 +0000 (01:08 +0000)
committerfred <fred>
Thu, 19 Mar 1998 01:08:19 +0000 (01:08 +0000)
bin/wild-perl [new file with mode: 0644]

diff --git a/bin/wild-perl b/bin/wild-perl
new file mode 100644 (file)
index 0000000..83c2c82
--- /dev/null
@@ -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;
+       }
+}