Browse Source

tools: fix libtool version check for Debian

On Debian, the libtool version is prefixed by "Debian-":

    $ libtool --version | head -1
    libtool (GNU libtool) 2.5.4 Debian-2.5.4-4

As a consequence, the extracted version is incorrect:

    $ libtool --version | head -1 | sed s/'.* '//
    Debian-2.5.4-4

causing the bootstrap script to fail:

    ./bootstrap: 31: [: Illegal number: Debian-2
    ./bootstrap: 32: [: Illegal number: Debian-2
    ./bootstrap: 33: [: Illegal number: Debian-2

Extract the first pattern matching NUM.NUM or NUM.NUM.NUM.
pull/188/head
Romain Vimont 7 months ago
committed by Steve Lhomme
parent
commit
42e32fb792
  1. 2
      extras/tools/bootstrap

2
extras/tools/bootstrap

@ -128,7 +128,7 @@ else
if [ -z "$2" ];then
FOUND="$FOUND $1"
else
gotver=`$1 --version | head -1 | sed s/'.* '//`
gotver=`$1 --version | head -1 | grep -o '[0-9]\+\.[0-9]\+\(\.[0-9]\+\)\?' | head -1`
check_version $1 $gotver $2
fi
fi

Loading…
Cancel
Save