mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
trying to ban $2 temp1/2 starts of - negative temps, we'll see if that works
This commit is contained in:
parent
15afeadcd2
commit
aa4e2cf8e5
4
inxi
4
inxi
|
@ -3056,7 +3056,7 @@ local sample="
|
||||||
tempUnit="°" $4
|
tempUnit="°" $4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/^temp1:/ {
|
/^temp1:/ && ! $2 ~ /^-/ {
|
||||||
tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 )
|
tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 )
|
||||||
if ( temp1 == "" || tempWorking > 0 ) {
|
if ( temp1 == "" || tempWorking > 0 ) {
|
||||||
temp1=tempWorking
|
temp1=tempWorking
|
||||||
|
@ -3065,7 +3065,7 @@ local sample="
|
||||||
tempUnit="°" $3
|
tempUnit="°" $3
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/^temp2:/ {
|
/^temp2:/ && ! $2 ~ /^-/ {
|
||||||
# add to array if array index does not exist OR if number is > 0
|
# add to array if array index does not exist OR if number is > 0
|
||||||
tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 )
|
tempWorking=gensub( /\+(.+)/, "\\1", 1, $2 )
|
||||||
if ( temp2 == "" || tempWorking > 0 ) {
|
if ( temp2 == "" || tempWorking > 0 ) {
|
||||||
|
|
Loading…
Reference in a new issue