From 94430374cb13f2893532581193b8c3d8b59ccedd Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Sun, 8 May 2016 13:46:19 +1000 Subject: [PATCH] only call uname -m once, might fix awk --- neofetch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index 16f82231..b53ff6db 100755 --- a/neofetch +++ b/neofetch @@ -502,6 +502,7 @@ getdistro () { "iPhone OS") distro="iOS $(sw_vers -productVersion)" + idevice="$(uname -m)" # "uname -m" doesn't print architecture on iOS so we force it off. os_arch="off" @@ -951,8 +952,8 @@ getcpu () { ;; "iPhone OS") - cpu="$(awk -F '|' '/$(uname -m)/ {printf $2}' idevicehw.csv)" - cores="$(awk -F '|' '/$(uname -m)/ {printf $3}' idevicehw.csv)" + cpu="$(awk -F '|' '/$idevice/ {printf $2}' idevicehw.csv)" + cores="$(awk -F '|' '/$idevice/ {printf $3}' idevicehw.csv)" ;; *) @@ -1167,7 +1168,7 @@ getgpu () { ;; "iPhone OS") - gpu="$(awk -F '|' '/$(uname -m)/ {printf $4}' idevicehw.csv)" + gpu="$(awk -F '|' '/$idevice/ {printf $4}' idevicehw.csv)" ;; *"BSD")