From 46fcc377f09dceee4fffc8f64b2bfcc6988b7798 Mon Sep 17 00:00:00 2001 From: rickhelmus Date: Fri, 20 Oct 2023 21:09:04 +0200 Subject: [PATCH] misc fixes --- utils/make_bundle.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/make_bundle.R b/utils/make_bundle.R index 72863734..507df1be 100644 --- a/utils/make_bundle.R +++ b/utils/make_bundle.R @@ -28,6 +28,9 @@ file.copy("bundle/Renviron.site", file.path(RExtrDir, "R", "etc"), overwrite = T # cat("\n# Customization of patRoon", # "options(repos = c(CRAN = \"https://cran.rstudio.com/\", patRoonDeps = \"https://rickhelmus.github.io/patRoonDeps/\"))", # sep = "\n", file = file.path(RExtrDir, "R", "etc", "Rprofile.site"), append = TRUE) +cat("\n# Customization of patRoon", + "options(repos = c(CRAN = \"https://cran.rstudio.com/\"))", + sep = "\n", file = file.path(RExtrDir, "R", "etc", "Rprofile.site"), append = TRUE) for (dir in c(file.path(RExtrDir, "user", "library"), file.path(RExtrDir, "user", "Rdata"), @@ -54,7 +57,8 @@ Rlib <- normalizePath(file.path(RExtrDir, "R", "library"), winslash = "/") execInR(sprintf(paste('install.packages("remotes")', 'thisRVersion <- paste(R.Version()$major, floor(as.numeric(R.Version()$minor)), sep = ".")', - 'install.packages(Sys.glob("%s/%s/*.zip"), repos = NULL, type = "win.binary")', + 'pkgdir <- file.path("%s", thisRVersion)', + 'install.packages(Sys.glob(paste0(pkgdir, "/*.zip")), repos = NULL, type = "win.binary")', 'remotes::install_github("rickhelmus/patRoonData")', 'remotes::install_github("rickhelmus/patRoonExt")', 'remotes::install_github("rickhelmus/patRoonInst")', @@ -64,6 +68,6 @@ execInR(sprintf(paste('install.packages("remotes")', # get current GH hash so we can tag it in the bundle file name SHA <- read.dcf(file.path(RExtrDir, "user", "library", "patRoon", "DESCRIPTION"))[, "RemoteSha"] -output <- normalizePath(sprintf("patRoon-bundle-%s.zip", strtrim(SHA, 7))) +output <- normalizePath(sprintf("patRoon-bundle-%s.zip", strtrim(SHA, 7)), mustWork = FALSE) unlink(output) withr::with_dir(RExtrDir, utils::zip(output, Sys.glob("*")))