Commit 631ae8d2 authored by Dylan Araps's avatar Dylan Araps

GPU: [Linux] Hide duplicate lines

parent 464a810f
......@@ -1064,7 +1064,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 '\\"|\\" \\"' '!a[$0]++ && /"Display|"3D|"VGA/ {print $3 " " $4}'))
IFS="$old_ifs"
# Number the GPUs if more than one exists.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment