From 6e9420dd60bd92af61a943066246fe88a8f5bba7 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 5 Jul 2022 16:11:39 -0400 Subject: sbofixinfo: fix stupidity from last commit --- sbofixinfo | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sbofixinfo b/sbofixinfo index c4ba522..eeba16e 100755 --- a/sbofixinfo +++ b/sbofixinfo @@ -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/; } -- cgit v1.2.3