39 foreach $file (@files) { #Replace "//v800020/Publish" with "http://cdn.symbian,org" |
39 foreach $file (@files) { #Replace "//v800020/Publish" with "http://cdn.symbian,org" |
40 copy($file,$file . ".orig") or die ("Cannot copy file \"$file\". $!\n"); |
40 copy($file,$file . ".orig") or die ("Cannot copy file \"$file\". $!\n"); |
41 tie (@lines, 'Tie::File', $file, recsep => "\n") or die ("Cannot tie file \"$file\". $!\n"); |
41 tie (@lines, 'Tie::File', $file, recsep => "\n") or die ("Cannot tie file \"$file\". $!\n"); |
42 $n = 0; |
42 $n = 0; |
43 $file_fixed = 0; |
43 $file_fixed = 0; |
|
44 print @lines[49] . "\n"; |
44 foreach (@lines) { |
45 foreach (@lines) { |
45 if (lc(@lines[$n]) =~ m/epoc32\\release\\armv5\\urel\\/) { |
46 if (lc(@lines[$n]) =~ m/epoc32\\release\\armv5\\urel\\/) { |
46 @lines[$n] = lc(@lines[$n]); |
47 @lines[$n] = lc(@lines[$n]); |
47 @lines[$n] =~ s/\\armv5\\urel\\/\\\$(platform)\\\$(target)\\/; |
48 @lines[$n] =~ s/\\armv5\\urel\\/\\\$(platform)\\\$(target)\\/; |
|
49 $file_fixed = 1; |
|
50 } |
|
51 if (lc(@lines[$n]) =~ m/epoc32\/release\/armv5\/urel\//) { |
|
52 @lines[$n] = lc(@lines[$n]); |
|
53 @lines[$n] =~ s/\/armv5\/urel\//\/\$(platform)\/\$(target)\//; |
48 $file_fixed = 1; |
54 $file_fixed = 1; |
49 } |
55 } |
50 if (lc(@lines[$n]) =~ m/epoc32\\release\\armv5\\udeb\\/) { |
56 if (lc(@lines[$n]) =~ m/epoc32\\release\\armv5\\udeb\\/) { |
51 @lines[$n] = lc(@lines[$n]); |
57 @lines[$n] = lc(@lines[$n]); |
52 @lines[$n] =~ s/\\armv5\\udeb\\/\\\$(platform)\\\$(target)\\/; |
58 @lines[$n] =~ s/\\armv5\\udeb\\/\\\$(platform)\\\$(target)\\/; |
53 $file_fixed = 1; |
59 $file_fixed = 1; |
54 } |
60 } |
|
61 # if (lc(@lines[$n]) =~ m/e:\\/) { # Replace e: with c: |
|
62 # @lines[$n] = lc(@lines[$n]); |
|
63 # @lines[$n] =~ s/e:\\/c:\\/; |
|
64 # $file_fixed = 1; |
|
65 # } |
55 $n++; |
66 $n++; |
56 } |
67 } |
57 if ($file_fixed) { print $file . " fixed.\n"; } |
68 if ($file_fixed) { print $file . " fixed.\n"; } |
58 untie @lines; |
69 untie @lines; |
59 } |
70 } |
60 |
71 |
61 find(\&Parse_ini, $package_path); |
72 find(\&Parse_ini, $package_path); |
62 |
73 |
63 foreach $file (@ini_files) { |
74 foreach $file (@ini_files) { |
64 if ($file =~ m/\/init\//) { # Only operate on files from /init/ directories |
75 if ((lc($file) =~ m/\/init\//) || (lc($file) =~ m/\/group\//)) { # Only operate on files from /init/ directories |
65 copy($file,$file . ".orig") or die ("Cannot copy file \"$file\". $!\n"); |
76 copy($file,$file . ".orig") or die ("Cannot copy file \"$file\". $!\n"); |
66 tie (@lines, 'Tie::File', $file, recsep => "\n") or die ("Cannot tie file \"$file\". $!\n"); |
77 tie (@lines, 'Tie::File', $file, recsep => "\n") or die ("Cannot tie file \"$file\". $!\n"); |
67 $n = 0; |
78 $n = 0; |
68 $file_fixed = 0; |
79 $file_fixed = 0; |
69 foreach (@lines) { |
80 foreach (@lines) { |