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