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 Johan Wikman
parent 1c647f3753
commit 16d7efe4ec

View File

@ -119,7 +119,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