Distro: Get $machine_arch case outside the if statement
So if $os_arch=off, then the machine_arch will still be populated.
This commit is contained in:
parent
36bae0815e
commit
681208fa21
2
neofetch
2
neofetch
|
@ -221,12 +221,12 @@ get_distro() {
|
||||||
[[ -z "$distro" ]] && distro="$os (Unknown)"
|
[[ -z "$distro" ]] && distro="$os (Unknown)"
|
||||||
|
|
||||||
# Get OS architecture.
|
# Get OS architecture.
|
||||||
if [[ "$os_arch" == "on" ]]; then
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;;
|
"Solaris" | "AIX" | "BSD" | "Haiku" | "IRIX") machine_arch="$(uname -p)" ;;
|
||||||
*) machine_arch="$(uname -m)" ;;
|
*) machine_arch="$(uname -m)" ;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
if [[ "$os_arch" == "on" ]]; then
|
||||||
distro+=" ${machine_arch}"
|
distro+=" ${machine_arch}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Reference in New Issue