aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@t61.perex-int.cz>2010-08-25 12:14:04 +0200
committerJaroslav Kysela <perex@perex.cz>2010-08-25 12:14:04 +0200
commitdcc6fe39aa341d3904a0163ebc1983d7615832fb (patch)
tree52d4f5c91d02dace95fb825f3968655ce801ae8c
parenta1527b72ab7210d0b889a3f28891ec8485c79702 (diff)
downloadalsa-driver-build-unstable-dcc6fe39aa341d3904a0163ebc1983d7615832fb.tar.gz
alsa-compile.sh: Check if lsb package is installed for Fedora distro
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rwxr-xr-xutils/alsa-compile.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/utils/alsa-compile.sh b/utils/alsa-compile.sh
index 9c4bb075e..d3065d771 100755
--- a/utils/alsa-compile.sh
+++ b/utils/alsa-compile.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-version=0.2.3
+version=0.2.4
protocol=
distrib=unknown
distribver=0.0
@@ -287,6 +287,14 @@ question_bool() {
# Set $distrib and $distribver
check_distribution() {
distrib=$(lsb_release -ds 2> /dev/null | cut -d ' ' -f 1)
+ if test -z "$distrib"; then
+ if test -f /etc/redhat-release; then
+ distrib="Fedora"
+ install_package lsb
+ distrib=
+ fi
+ distrib=$(lsb_release -ds 2> /dev/null | cut -d ' ' -f 1)
+ fi
local first=${distrib:0:1}
if test "$first" = "\""; then
distrib=${distrib:1}
@@ -323,6 +331,7 @@ install_package() {
test "$pkg" == "alsa-lib-devel" && pkg="alsa-devel"
;;
Fedora)
+ test "$pkg" == "lsb" && pkg="redhat-lsb"
;;
*)
echo >&2 "Cannot install $1 for unsupported distribution $distrib."
@@ -334,7 +343,7 @@ install_package() {
zypper install $pkg
;;
Fedora)
- yum install $pkg
+ yum install -y $pkg
;;
*)
echo >&2 "Cannot install $pkg for unsupported distribution $distrib."