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:
Muhammad Herdiansyah 2017-06-22 04:04:47 +07:00
parent 36bae0815e
commit 681208fa21
1 changed files with 5 additions and 5 deletions

View File

@ -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)" ;;
esac
if [[ "$os_arch" == "on" ]]; then
distro+=" ${machine_arch}"
fi