Skip to content

Commit 939c53e

Browse files
committed
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.
1 parent 535040a commit 939c53e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

configure

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ probe() {
104104
T=$(command -v $P 2>&1)
105105
if [ $? -eq 0 ]
106106
then
107-
VER0=$($P --version 2>/dev/null | head -1 \
108-
| sed -e 's/[^0-9]*\([vV]\?[0-9.]\+[^ ]*\).*/\1/' )
107+
VER0=$($P --version 2>/dev/null \
108+
| grep -o '[vV]\?[0-9][0-9.][a-z0-9.-]*' | head -1 )
109109
if [ $? -eq 0 -a "x${VER0}" != "x" ]
110110
then
111111
VER="($VER0)"

0 commit comments

Comments
 (0)