mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
configure: display correct version for md5sum
The old code simply scanned for the first digit, then munched anything after that. This didn't work for md5sum, as it would see the "5" and treat "5sum" as the version instead. This patch tweaks the algorithm so that it looks for a second consecutive digit (or dot) after the first. Since "md5sum" has only one digit, the new code skips over it as intended.
This commit is contained in:
parent
535040aab8
commit
939c53ea42
4
configure
vendored
4
configure
vendored
@ -104,8 +104,8 @@ probe() {
|
||||
T=$(command -v $P 2>&1)
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
VER0=$($P --version 2>/dev/null | head -1 \
|
||||
| sed -e 's/[^0-9]*\([vV]\?[0-9.]\+[^ ]*\).*/\1/' )
|
||||
VER0=$($P --version 2>/dev/null \
|
||||
| grep -o '[vV]\?[0-9][0-9.][a-z0-9.-]*' | head -1 )
|
||||
if [ $? -eq 0 -a "x${VER0}" != "x" ]
|
||||
then
|
||||
VER="($VER0)"
|
||||
|
Loading…
Reference in New Issue
Block a user