From eb8a354cd01b4e8cb87ae99a8b9ed49f8fd74939 Mon Sep 17 00:00:00 2001 From: ihiverlet Date: Fri, 13 Oct 2023 14:45:11 +0000 Subject: [PATCH] now located in r-minimal/Rprofile.site --- scripts/onyxia-set-repositories.sh | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/scripts/onyxia-set-repositories.sh b/scripts/onyxia-set-repositories.sh index ed42cdfb..aad512e5 100644 --- a/scripts/onyxia-set-repositories.sh +++ b/scripts/onyxia-set-repositories.sh @@ -27,33 +27,3 @@ if [ "`which conda`" != "" ]; then fi fi -if command -v R; then - if [[ -n "$R_REPOSITORY" ]] || [[ -n "$PACKAGE_MANAGER_URL" ]]; then - echo "configuration r (add local repository)" - - echo '# https://docs.rstudio.com/rspm/admin/serving-binaries/#binaries-r-configuration-linux' > ${R_HOME}/etc/Rprofile.site - echo 'options(HTTPUserAgent = sprintf("R/%s R (%s)", getRversion(), paste(getRversion(), R.version["platform"], R.version["arch"], R.version["os"])))' >> ${R_HOME}/etc/Rprofile.site - echo '# Proxy repository for R' >> ${R_HOME}/etc/Rprofile.site - echo 'local({' >> ${R_HOME}/etc/Rprofile.site - echo ' r <- getOption("repos")' >> ${R_HOME}/etc/Rprofile.site - - if [[ -n "$PACKAGE_MANAGER_URL" ]]; then - UBUNTU_CODENAME=$(cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d= -f2) - echo " r[\"PackageManager\"] <- \"${PACKAGE_MANAGER_URL}/${UBUNTU_CODENAME}/latest\"" >> ${R_HOME}/etc/Rprofile.site - fi - - if [[ -n "$R_REPOSITORY" ]]; then - echo " r[\"LocalRepository\"] <- \"${R_REPOSITORY}\"" >> ${R_HOME}/etc/Rprofile.site - fi - - echo ' options(repos = r)' >> ${R_HOME}/etc/Rprofile.site - echo '})' >> ${R_HOME}/etc/Rprofile.site - - # Unsure if this last line below should be inside this is ; - # leaving it here for now, but should be reviewed before. - - # Configure renv to use the specified package repository - echo 'options(renv.config.repos.override = getOption("repos"))' >> ${R_HOME}/etc/Rprofile.site - fi - -fi