# HG changeset patch # User Tom Pritchard # Date 1287071214 -3600 # Node ID c57a6c85ccdcc2475e5b9f0f3a7b9bee0e5c3871 # Parent 1a6d7a8194fbd472a1905bb2ccfc47b41ea76950 Fix up the filter_obyfile.pl to make it not double "stem_" things diff -r 1a6d7a8194fb -r c57a6c85ccdc tools/filter_obyfile.pl --- a/tools/filter_obyfile.pl Thu Oct 14 16:46:13 2010 +0100 +++ b/tools/filter_obyfile.pl Thu Oct 14 16:46:54 2010 +0100 @@ -264,9 +264,17 @@ if (defined $stem_substitutions{$romfile}) { - # print STDERR "Applying stem_ prefix to $hostfile in $line\n"; - $hostfile =~ s/(\/|\\)([^\\\/]+)$/$1stem_$2/; - $stem_count++; + if ($hostfile =~ /^(.*(\/|\\))([^\\\/]+)$/) + { + my $path=$1; + my $filename=$3; + if ($filename !~ /^stem_/) + { + # print STDERR "Applying stem_ prefix to $hostfile in $line\n"; + $hostfile = "${path}stem_$filename"; + $stem_count++; + } + } } print $romcmd, $hostfile, $romfile, $rest, "\n"; next;