From 988c0b29a76a7a21e9a2d2083be3170ae8871a0b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 22 Dec 2016 13:00:16 +1100 Subject: [PATCH] GPU: Rename index to gpu_num --- neofetch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 204ca0e0..c44091de 100755 --- a/neofetch +++ b/neofetch @@ -969,7 +969,7 @@ get_gpu() { gpus=($(lspci -mm | awk -F '\\"|\\" \\"' '/"Display|"3D|"VGA/ {print $3 " " $4}')) # Number the GPUs if more than one exists. - [[ "${#gpus[@]}" > 1 ]] && index=0 + [[ "${#gpus[@]}" > 1 ]] && gpu_num=0 for gpu in "${gpus[@]}"; do case "$gpu" in @@ -1005,8 +1005,8 @@ get_gpu() { gpu="${gpu/Intel }" fi - prin "GPU${index}" "$gpu" - index="$((index+=1))" + prin "GPU${gpu_num}" "$gpu" + gpu_num="$((gpu_num+=1))" done return