Fix GPU count
This commit is contained in:
parent
2284cde0d8
commit
35369534b8
3
fetch
3
fetch
|
@ -837,9 +837,10 @@ getgpu () {
|
||||||
"Linux")
|
"Linux")
|
||||||
# Get the GPUs
|
# Get the GPUs
|
||||||
gpu="$(lspci | grep -F "VGA" | uniq -c)"
|
gpu="$(lspci | grep -F "VGA" | uniq -c)"
|
||||||
|
gpu=${gpu/??':'??'.'?}
|
||||||
|
|
||||||
# Count the number of GPUs
|
# Count the number of GPUs
|
||||||
count=${gpu/ ??:*}
|
count=${gpu/ VGA*}
|
||||||
count=${count//[[:space:]]}
|
count=${count//[[:space:]]}
|
||||||
|
|
||||||
# If there's more than one gpu
|
# If there's more than one gpu
|
||||||
|
|
Reference in New Issue