mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 03:35:42 +01:00
reduce exec
s by four and eliminate logic bug
Per `info uname,` `uname` always prints its data in the same order. Also, "note that A && B || C is not if-then-else. C may run when A is true." https://www.shellcheck.net/wiki/SC2015 set -x; read -r KERNEL_VERSION < <(uname -v); smp=x; [[ "$KERNEL_VERSION" = *SMP* ]] && { smp=y; readonly smp; false;} || smp=n; set -
This commit is contained in:
parent
ca503e3519
commit
037aed92e3
1 changed files with 3 additions and 5 deletions
|
@ -415,11 +415,9 @@ fi
|
||||||
# Fetch the info and store in temp files/variables
|
# Fetch the info and store in temp files/variables
|
||||||
TSTAMP=$(LANG=C TZ=UTC date)
|
TSTAMP=$(LANG=C TZ=UTC date)
|
||||||
DISTRO=$(grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus\|ALT" /etc/{issue,*release,*version})
|
DISTRO=$(grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus\|ALT" /etc/{issue,*release,*version})
|
||||||
KERNEL_VERSION=$(uname -r)
|
read -r KERNEL_RELEASE KERNEL_MACHINE KERNEL_PROCESSOR KERNEL_OS < <(uname -rpmo)
|
||||||
KERNEL_PROCESSOR=$(uname -p)
|
read -r KERNEL_VERSION < <(uname -v)
|
||||||
KERNEL_MACHINE=$(uname -m)
|
if [[ "$KERNEL_VERSION" = *SMP* ]]; then KERNEL_SMP="Yes"; else KERNEL_SMP="No"; fi
|
||||||
KERNEL_OS=$(uname -o)
|
|
||||||
[[ $(uname -v | grep SMP) ]] && KERNEL_SMP="Yes" || KERNEL_SMP="No"
|
|
||||||
ALSA_DRIVER_VERSION=$(cat /proc/asound/version | head -n1 | awk '{ print $7 }' | sed 's/\.$//')
|
ALSA_DRIVER_VERSION=$(cat /proc/asound/version | head -n1 | awk '{ print $7 }' | sed 's/\.$//')
|
||||||
get_alsa_library_version
|
get_alsa_library_version
|
||||||
ALSA_UTILS_VERSION=$(amixer -v | awk '{ print $3 }')
|
ALSA_UTILS_VERSION=$(amixer -v | awk '{ print $3 }')
|
||||||
|
|
Loading…
Reference in a new issue