File tree 1 file changed +3
-18
lines changed
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() {
27
27
28
28
install_gcc_brew ()
29
29
{
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}
47
31
32
+ # make an unversioned symlink
48
33
os_ver=$( sw_vers -productVersion | cut -d' .' -f1)
49
- # default homebrew bin dir changed with macos 14
50
34
if (( "$os_ver " > 13 )) ; then
35
+ # default homebrew bin dir changed with macos 14
51
36
ln -fs /opt/homebrew/bin/gfortran-${version} /usr/local/bin/gfortran
52
37
ln -fs /opt/homebrew/bin/gcc-${version} /usr/local/bin/gcc
53
38
ln -fs /opt/homebrew/bin/g++-${version} /usr/local/bin/g++
You can’t perform that action at this time.
0 commit comments