~andyc/oil

9cfd11a901549f19095443da9f3b17de14464a12 — Andy Chu 2 months ago 0f9acca dev/andy-vb2
[build] Scripts to install R 4.0 from a custom repo
1 files changed, 26 insertions(+), 0 deletions(-)

M build/dev.sh
M build/dev.sh => build/dev.sh +26 -0
@@ 78,6 78,32 @@ travis-r-libs() {
  test-r-packages
}

# 3/2021: For installing dplyr on Ubuntu Xenial 16.04 LTS, which has an old R version
# Following these instructions
# https://cloud.r-project.org/bin/linux/ubuntu/README.html

_install-new-r() {
  # update indices
  apt update -qq

  # install two helper packages we need
  apt install --no-install-recommends software-properties-common dirmngr

  # import the signing key (by Michael Rutter) for these repo
  apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9

  # add the R 4.0 repo from CRAN -- adjust 'focal' to 'groovy' or 'bionic' as needed
  add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/'

  # Hm I had to run this manually and I got R 4.0
  apt install --no-install-recommends r-base
}

install-new-r() {
  sudo $0 _install-new-r "$@"
}


# Helper
gen-asdl-py() {
  local asdl_path=$1  # e.g. osh/osh.asdl