mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 04:22:32 +00:00
Use uname to get the architecture
This commit is contained in:
16
neofetch
16
neofetch
@@ -452,10 +452,6 @@ esac
|
||||
|
||||
# Distro {{{
|
||||
|
||||
# Default bit style
|
||||
x64="x86_64"
|
||||
x32="x86"
|
||||
|
||||
case "$os" in
|
||||
"Linux" )
|
||||
if type -p lsb_release >/dev/null 2>&1; then
|
||||
@@ -510,10 +506,6 @@ case "$os" in
|
||||
distro=${distro//[[:space:]]/ }
|
||||
distro=${distro// }
|
||||
distro=${distro/Microsoft }
|
||||
|
||||
# Change bits to xx-bit for Windows
|
||||
x64="64-bit"
|
||||
x32="32-bit"
|
||||
;;
|
||||
esac
|
||||
distro=${distro//+( )/ }
|
||||
@@ -521,12 +513,8 @@ ascii_distro="$distro"
|
||||
|
||||
getdistro () {
|
||||
# Get architecture
|
||||
if [ "$os_arch" == "on" ]; then
|
||||
case "$(getconf LONG_BIT)" in
|
||||
64) distro+=" $x64" ;;
|
||||
32) distro+=" $x32" ;;
|
||||
esac
|
||||
fi
|
||||
[ "$os_arch" == "on" ] && \
|
||||
distro+=" $(uname -m)"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user