summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-16 17:50:27 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-16 17:50:27 (GMT)
commitd285ebb248e1e416efef879f9318e960a144706d (patch)
tree6f0631b1ca8ddc30165cc258f770bcfb298f2556 /configure
parent60b7c724bd93925ad849c78fc4c678edbe63cd18 (diff)
Simplify a bit more bash detection.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 2 insertions, 2 deletions
diff --git a/configure b/configure
index 125908e..d7bb471 100755
--- a/configure
+++ b/configure
@@ -123,8 +123,8 @@ fi
# Check bash is present, and at least version 3.0
[ -x /bin/bash ] || do_error "bash 3.0 or above was not found in /bin/bash"
-bash_version=$(/bin/bash --version |sed -r -e '2,$d' -e 's/.* version ([[:digit:]]+).*/\1/;')
-bash_major=${bash_version%%.*}
+bash_version=$(/bin/bash -c 'echo ${BASH_VERSION}')
+bash_major=$(/bin/bash -c 'echo ${BASH_VERSINFO[0]}')
[ ${bash_major} -ge 3 ] || do_error "bash 3.0 or above is needed (found ${bash_version})"
sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \