diff options
Diffstat (limited to 'sbofixinfo')
-rwxr-xr-x | sbofixinfo | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -150,6 +150,12 @@ $errcnt = 0; fix_info($_) for @ARGV; exit $errcnt; +sub fix_key { + my $key = shift; + $key =~ tr/-a-wyz/_A-WYZ/; # leave "x" lowercase! + return $key; +} + sub fix_info { my $file = shift; if(-d $file) { @@ -180,11 +186,13 @@ sub fix_info { s/^(\w+)\s*=\s*/$1=/; # remove spaces around = if(/^(\w+)=(.*)$/) { - $key = uc $1; + $key = $1; $val = $2; $val =~ s,(?:^['"]|['"]$),,g; # remove quotes around value $val =~ s,[\s\\]*$,,; # remove any line-continuation backslash + $key = fix_key($key); + if($key =~ /^MD5SUM/) { $val =~ tr/A-Z/a-z/; } |