-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-all-packages.R
More file actions
29 lines (21 loc) · 1 KB
/
Copy pathinstall-all-packages.R
File metadata and controls
29 lines (21 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Wrapper script to install all project packages with proper library path configuration
# This script configures the user library, then calls the main install-packages.R
# Configure user library path
lib_path <- file.path(Sys.getenv('USERPROFILE'), 'Documents/R/win-library/4.5')
dir.create(lib_path, showWarnings = FALSE, recursive = TRUE)
.libPaths(c(lib_path, .libPaths()))
# Clear memory from previous runs
base::rm(list = base::ls(all = TRUE))
# Now run the main installer
path_csv <- "utility/package-dependency-list.csv"
if (!file.exists(path_csv)) {
base::stop("The path `", path_csv, "` was not found. Make sure the working directory is set to the root of the repository.")
}
if (!base::requireNamespace("devtools")) {
utils::install.packages("devtools", repos = "https://cran.rstudio.com")
}
# Install GitHub package
devtools::install_github("OuhscBbmc/OuhscMunge", dependencies = TRUE)
# Run package janitor
OuhscMunge:::package_janitor_remote(path_csv)
cat("\n✓ Package installation completed!\n")