Skip to content

Commit

Permalink
determine release name, closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
cboettig committed Sep 30, 2024
1 parent f325383 commit 25e4531
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions install_r.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/bin/bash

# determine Ubuntu release
source /etc/os-release

## First: update apt and get keys
apt-get update -qq && apt-get install --yes --no-install-recommends wget ca-certificates gnupg
wget -q -O- https://eddelbuettel.github.io/r2u/assets/dirk_eddelbuettel_key.asc \
| tee -a /etc/apt/trusted.gpg.d/cranapt_key.asc

## Second: add the repo -- here we use the well-connected mirror
echo "deb [arch=amd64] https://r2u.stat.illinois.edu/ubuntu noble main" > /etc/apt/sources.list.d/cranapt.list
echo "deb [arch=amd64] https://r2u.stat.illinois.edu/ubuntu ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/cranapt.list
apt-get update

## Third: ensure current R is used
wget -q -O- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc \
| tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
echo "deb [arch=amd64] https://cloud.r-project.org/bin/linux/ubuntu noble-cran40/" > /etc/apt/sources.list.d/cran_r.list
echo "deb [arch=amd64] https://cloud.r-project.org/bin/linux/ubuntu ${UBUNTU_CODENAME}-cran40/" > /etc/apt/sources.list.d/cran_r.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 67C2D66C4B1D4339 51716619E084DAB9
apt-get update -qq
DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends r-base r-base-dev r-recommended
Expand Down
2 changes: 1 addition & 1 deletion install_rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apt-get update && apt-get -y install \
wget

ARCH=$(dpkg --print-architecture)
UBUNTU_CODENAME="noble"
source /etc/os-release

## Download RStudio Server for Ubuntu 18+
DOWNLOAD_FILE=rstudio-server.deb
Expand Down

0 comments on commit 25e4531

Please sign in to comment.