Merge pull request #746 from konimex/uname
Distro: Refactor $machine_arch
This commit is contained in:
commit
3314f7e38d
2 changed files with 12 additions and 3 deletions
|
@ -42,6 +42,10 @@
|
|||
|
||||
## Info
|
||||
|
||||
**Distro**
|
||||
|
||||
- [Solaris, AIX, Haiku] The machine architecture will now be shown properly instead of machine ID.
|
||||
|
||||
**Terminal Emulator**
|
||||
|
||||
- Added font support for mate-terminal. **[@mstraube](https://github.com/mstraube)**
|
||||
|
|
11
neofetch
11
neofetch
|
@ -216,8 +216,14 @@ get_distro() {
|
|||
[[ -z "$distro" ]] && distro="$os (Unknown)"
|
||||
|
||||
# Get OS architecture.
|
||||
[[ "$os_arch" == "on" ]] && \
|
||||
if [[ "$os_arch" == "on" ]]; then
|
||||
case "$os" in
|
||||
"Solaris" | "AIX" | "BSD" | "Haiku") machine_arch="$(uname -p)" ;;
|
||||
*) machine_arch="$(uname -m)" ;;
|
||||
|
||||
esac
|
||||
distro+=" ${machine_arch}"
|
||||
fi
|
||||
|
||||
[[ "${ascii_distro:-auto}" == "auto" ]] && \
|
||||
ascii_distro="$(trim "$distro")"
|
||||
|
@ -3772,11 +3778,10 @@ old_options() {
|
|||
cache_uname() {
|
||||
# Cache the output of uname so we don't
|
||||
# have to spawn it multiple times.
|
||||
uname=($(uname -srm))
|
||||
uname=($(uname -sr))
|
||||
|
||||
kernel_name="${uname[0]}"
|
||||
kernel_version="${uname[1]}"
|
||||
machine_arch="${uname[2]}"
|
||||
}
|
||||
|
||||
convert_time() {
|
||||
|
|
Loading…
Reference in a new issue