Use uname to get the architecture

This commit is contained in:
Dylan 2016-04-04 22:12:45 +10:00
parent 8520104000
commit e75a67f92b

View file

@ -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)"
}