|
17 | 17 | R_MAJOR_VERSION=( ${R_VERSION//./ } )
|
18 | 18 | if [[ "${R_MAJOR_VERSION}" == "3" ]]; then
|
19 | 19 | export R_MAC_VERSION=3.6.3
|
| 20 | + export R_MAC_PKG_URL=https://cran.r-project.org/bin/macosx/R-${R_MAC_VERSION}.pkg |
20 | 21 | export R_LINUX_VERSION="3.6.3-1bionic"
|
21 | 22 | export R_APT_REPO="bionic-cran35/"
|
22 | 23 | elif [[ "${R_MAJOR_VERSION}" == "4" ]]; then
|
23 | 24 | export R_MAC_VERSION=4.1.2
|
| 25 | + export R_MAC_PKG_URL=https://cran.r-project.org/bin/macosx/base/R-${R_MAC_VERSION}.pkg |
24 | 26 | export R_LINUX_VERSION="4.1.2-1.2004.0"
|
25 | 27 | export R_APT_REPO="focal-cran40/"
|
26 | 28 | else
|
|
66 | 68 | if [[ $OS_NAME == "macos" ]]; then
|
67 | 69 | brew update-reset && brew update
|
68 | 70 | if [[ $R_BUILD_TYPE == "cran" ]]; then
|
69 |
| - brew install automake |
| 71 | + brew install automake || exit -1 |
70 | 72 | fi
|
71 | 73 | brew install \
|
72 | 74 | checkbashisms \
|
73 |
| - qpdf |
74 |
| - brew install --cask basictex |
| 75 | + qpdf || exit -1 |
| 76 | + brew install --cask basictex || exit -1 |
75 | 77 | export PATH="/Library/TeX/texbin:$PATH"
|
76 |
| - sudo tlmgr --verify-repo=none update --self |
77 |
| - sudo tlmgr --verify-repo=none install inconsolata helvetic |
| 78 | + sudo tlmgr --verify-repo=none update --self || exit -1 |
| 79 | + sudo tlmgr --verify-repo=none install inconsolata helvetic || exit -1 |
78 | 80 |
|
79 |
| - curl -sL https://cran.r-project.org/bin/macosx/R-${R_MAC_VERSION}.pkg -o R.pkg |
| 81 | + curl -sL ${R_MAC_PKG_URL} -o R.pkg || exit -1 |
80 | 82 | sudo installer \
|
81 | 83 | -pkg $(pwd)/R.pkg \
|
82 |
| - -target / |
| 84 | + -target / || exit -1 |
83 | 85 |
|
84 | 86 | # Older R versions (<= 4.1.2) on newer macOS (>= 11.0.0) cannot create the necessary symlinks.
|
85 | 87 | # See https://github.com/r-lib/actions/issues/412.
|
|
0 commit comments