Commit a1df51f9 authored by Pietro Incardona's avatar Pietro Incardona

Added gfortran detection script

parent a1ae9507
#! /bin/bash
function detect_gfortran()
{
command -v $1 >/dev/null 2>&1
if [ $? -ne 0 ]; then
dgc_ret=0
return
fi
dgc_ret=1
}
#! /bin/bash
function solve_gfortran() {
source script/show_solutions
source script/discover_package_manager
discover_package_manager $1
pcman=$discover_package_manager_ret
if [ x"$pcman" = x"" ]; then
exit 1
fi
if [ x"$1" = x"osx" ]; then
commands[0]="$pcman install gfortran"
possible_solutions "${commands[@]}"
echo "Executing: ${command[$possible_solutions_ret]}"
eval ${commands[$possible_solutions_ret]}
elif [ x"$1" = x"linux" ]; then
commands[0]="su -c \"$pcman install cmake\""
commands[1]="sudo $pcman install cmake"
possible_solutions "${commands[@]}"
echo "Executing: ${command[$possible_solutions_ret]}"
eval ${commands[$possible_solutions_ret]}
fi
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment