diff options
| author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-09-14 19:30:56 +0000 |
|---|---|---|
| committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-09-14 19:30:56 +0000 |
| commit | 26647ee5644316a0f2d4b2f51ab9bdd102dbb5b0 (patch) | |
| tree | df8ccc53dab71352bddf0be1f9e629cad3cdd716 /configure | |
| parent | 7b70a704e0f9197a79a37007968246ce4f66bcc0 (diff) | |
| download | crosstool-ng-26647ee5644316a0f2d4b2f51ab9bdd102dbb5b0.tar.gz crosstool-ng-26647ee5644316a0f2d4b2f51ab9bdd102dbb5b0.tar.bz2 crosstool-ng-26647ee5644316a0f2d4b2f51ab9bdd102dbb5b0.zip | |
Improve (POSIX-wise) determination of bashh version.
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |head -n 1 |cut -d ' ' -f 4) -bash_major=$(echo "${bash_version}" |sed -e 's/\..*//g;') +bash_version=$(/bin/bash --version |sed -r -e '2,$d' -e 's/.* version ([[:digit:]]+).*/\1/;') +bash_major=${bash_version%%.*} [ ${bash_major} -ge 3 ] || do_error "bash 3.0 or above is needed (found ${bash_version})" sed -r -e "s,@@BINDIR@@,${BINDIR},g;" \ |
