trying to ban $2 temp1/2 starts of - negative temps, we'll see if that works

This commit is contained in:
inxi-svn 2009-07-28 19:27:14 +00:00
parent 15afeadcd2
commit aa4e2cf8e5

4
inxi
View file

@ -3056,7 +3056,7 @@ local sample="
tempUnit="°" $4
}
}
/^temp1:/ {
/^temp1:/ && ! $2 ~ /^-/ {
tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 )
if ( temp1 == "" || tempWorking > 0 ) {
temp1=tempWorking
@ -3065,7 +3065,7 @@ local sample="
tempUnit="°" $3
}
}
/^temp2:/ {
/^temp2:/ && ! $2 ~ /^-/ {
# add to array if array index does not exist OR if number is > 0
tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 )
if ( temp2 == "" || tempWorking > 0 ) {