# HG changeset patch # User "Yann E. MORIN" # Date 1189965027 0 # Node ID fd7a636532cf8a965be247e9ece7eb9434dd2b3d # Parent 5e5d02b2d786156e1c814c9b4704e66e4b69b82c Simplify a bit more bash detection. diff -r 5e5d02b2d786 -r fd7a636532cf configure --- a/configure Sun Sep 16 08:52:26 2007 +0000 +++ b/configure Sun Sep 16 17:50:27 2007 +0000 @@ -123,8 +123,8 @@ # 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;" \