commit:5d7a3245aa4b35438ddbee6308b87b01550ccd29
author:Chip Black
committer:Chip Black
date:Mon Apr 21 00:53:02 2008 -0500
parents:8120b2e16647cef00185b91430455fd4995c8000
Periods (.) in extension patterns are now allowed (for things like .tar.gz)
diff --git a/conv.pl b/conv.pl
line changes: +4/-2
index 2f5a609..218dae1
--- a/conv.pl
+++ b/conv.pl
@@ -55,7 +55,7 @@ while (<CONF>) {
     s/\s+$//;
     next if /^$/;
 
-    if (/^(\w+)\s*=>\s*(\w+)\s*:\s*(.*)$/) {
+    if (/^([\w.]+)\s*=>\s*([\w.]+)\s*:\s*(.*)$/) {
         $rules{$2}{$1} = $3;
     } elsif (/^($var_re)\s*=\s*(.*)$/) {
         $vars{$1} = expand($2);
@@ -116,7 +116,9 @@ else {
     for my $ofile (@ARGV) {
         my $ofound = 0;
         for my $oext (keys %rules) {
-            if ($ofile =~ /^(.*)\.$oext$/) {
+            my $oext_re = $oext;
+            $oext_re =~ s/\./\\./g;
+            if ($ofile =~ /^(.*)\.$oext_re$/) {
                 my $base = $1;
                 my $ifound = 0;
                 for my $iext (keys %{$rules{$oext}}) {