Add $* for filename base
[conv.git] / conv.pl
diff --git a/conv.pl b/conv.pl
index 2378828..5904405 100755 (executable)
--- a/conv.pl
+++ b/conv.pl
@@ -38,6 +38,7 @@ sub convert {
     my $infile = "$base.$iext";
     $infile =~ s/"/\\"/g;
     $cmd =~ s!\$\<!"$infile"!g;
+    $cmd =~ s!\$\*!"$base"!g;
     my $outfile;
     if ($opts{o}) {
         if ($dirout) {
@@ -75,7 +76,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);