Fix up the filter_obyfile.pl to make it not double "stem_" things system_startup
authorTom Pritchard <tomp@symbian.org>
Thu, 14 Oct 2010 16:46:54 +0100
branchsystem_startup
changeset 41 c57a6c85ccdc
parent 40 1a6d7a8194fb
child 43 3abc9396eca6
Fix up the filter_obyfile.pl to make it not double "stem_" things
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;