utilise grep -e option to simplicfy if else
This commit is contained in:
parent
5185b03d49
commit
40eafdc44e
@ -124,11 +124,7 @@ function configure {
|
||||
"k10temp-"*)
|
||||
# AMD CPU
|
||||
# Find and set temperature search criteria
|
||||
if (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q "Tctl"); then
|
||||
CPU_ADDRESS_PREFIX=$item
|
||||
CPU_ITEM_PREFIX="Tccd"
|
||||
CPU_TEMP_CAPTION="Temp"
|
||||
elif (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q "Tccd"); then
|
||||
if (echo "$sensorsOutput" | grep -A 4 "$item" | grep -q -e "Tctl" -e "Tccd"); then
|
||||
CPU_ADDRESS_PREFIX=$item
|
||||
CPU_ITEM_PREFIX="Tccd"
|
||||
CPU_TEMP_CAPTION="Temp"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user