install-r.sh 693 Bytes
Newer Older
Jean-Francois Rey's avatar
Jean-Francois Rey committed
1
2
3
#!/bin/bash

echo "Downloading gfortran for catalina..."
4
curl -LO https://github.com/fxcoudert/gfortran-for-macOS/releases/download/10.2/gfortran-10.2-Catalina.dmg
Jean-Francois Rey's avatar
Jean-Francois Rey committed
5
6
echo "Install gfortran"
hdiutil attach gfortran-10.2-Catalina.dmg
Jean-Francois Rey's avatar
Jean-Francois Rey committed
7
8
sudo installer -package /Volumes/gfortran*/gfortran.pkg -target /
hdiutil detach /Volumes/gfortran*/
9
rm gfortran-10.2-Catalina.dmg
Jean-Francois Rey's avatar
Jean-Francois Rey committed
10
11

echo "Downloading R-4.0 Nightly..."
12
curl -LO https://mac.r-project.org/high-sierra/R-4.0-branch/R-4.0-branch.pkg
Jean-Francois Rey's avatar
Jean-Francois Rey committed
13
echo "Installing R"
14
15
sudo installer -package R-4.0-branch.pkg -target /
rm R-4.0-branch.pkg
Jean-Francois Rey's avatar
Jean-Francois Rey committed
16

17
18
echo "export PATH=/usr/local/gfortran/bin:\$PATH" >> ~\.bashrc
echo "export PATH=/usr/local/gfortran/bin:\$PATH" >> ~\.zshrc
Jean-Francois Rey's avatar
Jean-Francois Rey committed
19