diff options
author | B. Watson <urchlay@slackware.uk> | 2022-07-05 16:11:39 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2022-07-07 00:33:02 -0400 |
commit | 6e9420dd60bd92af61a943066246fe88a8f5bba7 (patch) | |
tree | 2ed1bf37ebb99e9b751666cb68ef5c2387b04231 /sbofixinfo | |
parent | 02909612d07fc52ce09bf5f2bd3a0c46d7d8340a (diff) | |
download | sbo-maintainer-tools-6e9420dd60bd92af61a943066246fe88a8f5bba7.tar.gz |
sbofixinfo: fix stupidity from last commit
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/; } |