Keep comments other than the special ### comments.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5735 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-02-01 19:00:37 +00:00
parent 0457a578b5
commit 2ae6009448

View file

@ -37,13 +37,24 @@ while(<ENG>) {
close(ENG);
undef %set;
my $cblock = 1;
open(NEW, "<$ARGV[1]");
while(<NEW>) {
$_ =~ s/\r//g;
if($_ =~ /^ *\#/) {
# comment
if($_ !~ /^ *\#\#\#/) {
# no special ### comment -> keep it
if(!$cblock) {
print "\n";
$cblock = 1;
}
print $_;
}
next;
}
$_ =~ s/\r//g;
$cblock = 0;
if($_ =~ /^ *([a-z]+): *(.*)/) {
($var, $value) = ($1, $2);
@ -54,7 +65,7 @@ while(<NEW>) {
# the last one for a single phrase
if(!$ids{$set{'id'}}) {
print "### ".$set{'id'}." was not found in the english file!\n";
print "\n### ".$set{'id'}." was not found in the english file!\n";
next;
}