X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ef3acbef4d4754ec3af577d97d863a77a442b695..98565a6c0f5af14d8b0c0104570b927a56d0845c:/tools/simgrid_update_xml.pl diff --git a/tools/simgrid_update_xml.pl b/tools/simgrid_update_xml.pl index d0d7277bd3..bb98e25b2f 100755 --- a/tools/simgrid_update_xml.pl +++ b/tools/simgrid_update_xml.pl @@ -21,7 +21,7 @@ open INPUT, "$ARGV[0]" or die "Cannot open input file $ARGV[0]: $!\n"; $output_string .= "\n"; $output_string .= "\n"; -$output_string .= ""; +$output_string .= "\n"; my $line; while (defined($line = )) { @@ -29,12 +29,11 @@ while (defined($line = )) { # eat the header, whatever form it has next if ($line =~ s/<\?xml[^>]*>// && ! $line =~ /\S/); # just in case several tags are on the same line next if ($line =~ s/]*>// && ! $line =~ /\S/); - next if ($line =~ s/// && ! $line =~ /\S/); - if ($line =~ s///) { $fromversion = 0; - } else if ($line =~ s///) { + next if !$line =~ /\S/; + } elsif ($line =~ s///) { $fromversion = $1; if ($fromversion == $toversion) { warn "Input platform file version is already $fromversion. This should be a no-op.\n"; @@ -42,6 +41,7 @@ while (defined($line = )) { if ($fromversion > $toversion) { die "Input platform file version is more recent than this script (file version: $fromversion; script version: $toversion)\n"; } + next if !$line =~ /\S/; } if ($fromversion == 0) {