From 681208fa21be325caed7a2d9586333a4322a5095 Mon Sep 17 00:00:00 2001 From: Muhammad Herdiansyah Date: Thu, 22 Jun 2017 04:04:47 +0700 Subject: [PATCH] Distro: Get $machine_arch case outside the if statement So if $os_arch=off, then the machine_arch will still be populated. --- neofetch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index 539489ee..7c3ab813 100755 --- a/neofetch +++ b/neofetch @@ -221,12 +221,12 @@ get_distro() { [[ -z "$distro" ]] && distro="$os (Unknown)" # Get OS architecture. - if [[ "$os_arch" == "on" ]]; then - case "$os" in - "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; - *) machine_arch="$(uname -m)" ;; + case "$os" in + "Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;; + *) machine_arch="$(uname -m)" ;; - esac + esac + if [[ "$os_arch" == "on" ]]; then distro+=" ${machine_arch}" fi