Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

neofetch: Print MACHINE_ARCH not MACHINE for FreeBSD #2015

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jrtc27
Copy link

@jrtc27 jrtc27 commented Dec 28, 2021

MACHINE refers to the architecture family, whereas MACHINE_ARCH refers
to the specific variant. For x86, MACHINE is already split up into i386
and amd64, so there is only one MACHINE_ARCH for each, that takes an
identical value, and thus this patch has no effect there. There is also
the oddity of arm64, which only has one MACHINE_ARCH, but the name of
that is aarch64. For other architectures, one MACHINE covers multiple
MACHINE_ARCH variants, like powerpc which has powerpc, powerpcspe,
powerpc64 and powerpc64le. It's therefore more helpful to print
MACHINE_ARCH here, not MACHINE.

Note that MACHINE_ARCH is what official release information, such as
download pages and the list of supported architectures, tends to use,
due to its increased specificity.

This may also apply to other BSDs, but I have no experience of them.

MACHINE refers to the architecture family, whereas MACHINE_ARCH refers
to the specific variant. For x86, MACHINE is already split up into i386
and amd64, so there is only one MACHINE_ARCH for each, that takes an
identical value, and thus this patch has no effect there. There is also
the oddity of arm64, which only has one MACHINE_ARCH, but the name of
that is aarch64. For other architectures, one MACHINE covers multiple
MACHINE_ARCH variants, like powerpc which has powerpc, powerpcspe,
powerpc64 and powerpc64le. It's therefore more helpful to print
MACHINE_ARCH here, not MACHINE.

Note that MACHINE_ARCH is what official release information, such as
download pages and the list of supported architectures, tends to use,
due to its increased specificity.

This may also apply to other BSDs, but I have no experience of them.
hykilpikonna added a commit to hykilpikonna/hyfetch that referenced this pull request Jul 31, 2022
…ACHINE for FreeBSD

Upstream PR: dylanaraps#2015
Thanks to @jrtc27

Co-authored-by: Jessica Clarke <jrtc27@jrtc27.com>
@hykilpikonna
Copy link

Maybe a better way of writing it would be to test for [[ $kernel_name == FreeBSD ]] && machine_arch=$(uname -p) after the case block, but this is fine

@hykilpikonna
Copy link

Thank you for your contribution!

This PR is merged into hyfetch since this repo (dylanaraps/neofetch) seems no longer maintained.

HyFetch is a fork of neofetch with LGBTQ pride flags, but the repo also maintains an updated version of the original neofetch, addressing many pull requests that are not merged in the original repo.

Read the "Running Updated Original Neofetch" section for more info!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants