try to Fix MXS-2206 (#185)

* try to Fix MXS-2206

* use sort -v

* return empty line
This commit is contained in:
Oleksandr Kovtunenko 2019-01-08 11:58:35 +02:00 committed by Timofey Turenko
parent bc346422fb
commit d569cff98f

View File

@ -89,7 +89,7 @@ fi
sudo tar xzf cmake-3.7.1-Linux-x86_64.tar.gz -C /usr/ --strip-components=1
cmake_version=`cmake --version | grep "cmake version" | awk '{ print $3 }'`
if [ "$cmake_version" \< "3.7.1" ] ; then
if [ "`echo -e "3.7.1\n$cmake_version"|sort -V|head -n 1`" != "3.7.1" ] ; then
echo "cmake does not work! Trying to build from source"
wget -q https://cmake.org/files/v3.7/cmake-3.7.1.tar.gz --no-check-certificate
tar xzf cmake-3.7.1.tar.gz