X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/23fd1cb0846a94ec6b9f653d123ad56e5cdd8efb..5fc9ced695a6771d7ce0fc63d2a446ef1c7eff01:/tools/simgrid_update_xml.pl diff --git a/tools/simgrid_update_xml.pl b/tools/simgrid_update_xml.pl index 2ca57b959b..75f7acf737 100755 --- a/tools/simgrid_update_xml.pl +++ b/tools/simgrid_update_xml.pl @@ -19,10 +19,12 @@ my($output_string); $ARGV[0] or die "simgrid_update_xml.pl \n"; open INPUT, "$ARGV[0]" or die "Cannot open input file $ARGV[0]: $!\n"; -$output_string .= "\n"; -$output_string .= "\n"; -$output_string .= "\n"; -$output_string .= " \n"; +$output_string = "\n". + "\n". + "\n"; + + +my($AS_opened)=0; my $line; while (defined($line = )) { @@ -74,7 +76,21 @@ while (defined($line = )) { if ($fromversion < 3) { $line =~ s/\blink:ctn\b/link_ctn/g; $line =~ s/\btrace:connect\b/trace_connect/g; - $line =~ s/^(.*)<\/platform>(.*)$/ <\/AS>\n<\/platform>/; + + if($AS_opened && (($line=~ /<\/platform>/) || ($line=~ /\n"; + $AS_opened=1; + } } $output_string .= "$line\n";