gpu: Hide duplicate identical gpus

This commit is contained in:
Dylan Araps 2017-08-01 01:56:46 +10:00
parent 4e9f9af820
commit eb62c843c9
1 changed files with 1 additions and 1 deletions

View File

@ -1113,7 +1113,7 @@ get_gpu() {
"Linux")
# Read GPUs into array.
IFS=$'\n'
gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}'))
gpus=($(lspci -mm | awk -F '\\"|\\" \\"|\\(' '/"Display|"3D|"VGA/ {print $3 " " $4}' | uniq))
IFS="$old_ifs"
# Number the GPUs if more than one exists.