File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -27,27 +27,12 @@ install_environment_modules_apt() {
2727
2828install_gcc_brew ()
2929{
30- # check if gcc preinstalled via brew
31- current=$( brew list --versions gcc | cut -d' ' -f2)
32- current_major=$( echo $current | cut -d' .' -f1)
33- # if already installed, nothing to do
34- if [ " $current_major " == " $version " ]; then
35- echo " GCC $version already installed"
36- else
37- # otherwise install selected version
38- brew install gcc@${version}
39- fi
40-
41- # link the selected version, but first try unlinking both
42- # without and with specified version (cover case in which
43- # multiple versions are already installed and/or linked)
44- brew unlink gcc
45- brew unlink gcc@${version}
46- brew link gcc@${version}
30+ brew install --force gcc@${version}
4731
32+ # make an unversioned symlink
4833 os_ver=$( sw_vers -productVersion | cut -d' .' -f1)
49- # default homebrew bin dir changed with macos 14
5034 if (( "$os_ver " > 13 )) ; then
35+ # default homebrew bin dir changed with macos 14
5136 ln -fs /opt/homebrew/bin/gfortran-${version} /usr/local/bin/gfortran
5237 ln -fs /opt/homebrew/bin/gcc-${version} /usr/local/bin/gcc
5338 ln -fs /opt/homebrew/bin/g++-${version} /usr/local/bin/g++
You can’t perform that action at this time.
0 commit comments