Fix bug in install script for the gfortran version

add "|cut -d. -f1" to keep only the major version number
This commit is contained in:
Sylvain Tricot 2019-11-29 15:33:45 +01:00
parent 9296509f7b
commit b698eb7cfe
1 changed files with 1 additions and 1 deletions

View File

@ -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"