From 2bb28bb67b08b2f3f8fee2a0f2087b26770ca7fa Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 31 May 2018 15:01:20 +1000 Subject: [PATCH] cpu: Use uname -m for portability --- neofetch | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 04fe8192..a14120b3 100755 --- a/neofetch +++ b/neofetch @@ -996,8 +996,14 @@ get_distro() { [[ -z "$distro" ]] && distro="$os (Unknown)" + # Get OS architecture. + case "$os" in + "Solaris" | "AIX" | "Haiku" | "IRIX" | "FreeMiNT") machine_arch="$(uname -p)" ;; + *) machine_arch="$kernel_machine" ;; + esac + [[ "$os_arch" == "on" ]] && \ - distro+=" $HOSTTYPE" + distro+=" $machine_arch" [[ "${ascii_distro:-auto}" == "auto" ]] && \ ascii_distro="$(trim "$distro")"