From b698eb7cfeb79759c45d93b92e969d0980fe5e4d Mon Sep 17 00:00:00 2001 From: Sylvain Tricot Date: Fri, 29 Nov 2019 15:33:45 +0100 Subject: [PATCH] Fix bug in install script for the gfortran version add "|cut -d. -f1" to keep only the major version number --- src/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install.sh b/src/install.sh index 5851653..017d469 100755 --- a/src/install.sh +++ b/src/install.sh @@ -159,7 +159,7 @@ check_dependencies () { gcc_ver_min=6 log_message "Checking if gfortran >= $gcc_ver_min is installed..." command -V gfortran || return 1 - gcc_ver=$(gcc -dumpversion) + gcc_ver=$(gcc -dumpversion|cut -d. -f1) echo "You have gfortran version $gcc_ver installed" test "$gcc_ver" -ge "$gcc_ver_min" || return 1 log_message "Ok\n"