Skip to content

Instantly share code, notes, and snippets.

@j1n3l0
Created January 25, 2018 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j1n3l0/c50d2c679fe76bdb58e99a211c8007a5 to your computer and use it in GitHub Desktop.
Save j1n3l0/c50d2c679fe76bdb58e99a211c8007a5 to your computer and use it in GitHub Desktop.
#!/bin/sh -ex
codename=`lsb_release -c | tr -d '[:space:]' | cut -d ':' -f 2`
sources='/etc/apt/sources.list'
[ `grep -c CRAN ${sources}` -eq 0 ] && \
echo "deb https://http://mirrors.ebi.ac.uk/CRAN/bin/linux/ubuntu ${codename}/" >> ${sources}
sudo apt-get update
sudo apt-get install -y r-base
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment