Commit 5b56cf9e authored by Languillaume, Antoine's avatar Languillaume, Antoine
Browse files

Add call to build script in download script

parent bbc164ea
### Download and unzip project on user's computer
current_wd <- getwd()
## Check working directory is empty if not prompt user with message.
current_wd <- getwd()
current_files <- list.files(current_wd)
if(length(current_files) != 0){
......@@ -29,24 +30,27 @@ if(length(current_files) != 0){
}
## Download and unzip project
url_repo <- paste0("https://git.wageningenur.nl/langu001/PPS_data_management/-/archive/",
"refactor/PPS_data_management-refactor.zip")
download.file(url = url_repo,
destfile = file.path(current_wd, "project.zip"))
unzip("project.zip")
## Copy project file to working directory
list_files <- list.files("./PPS_data_management-refactor/",
full.names = TRUE)
file.copy(from = list_files,
to = "./",
recursive = TRUE)
## Get rid of un necessary files
unlink(file.path(current_wd, "./PPS_data_management-refactor/"),
recursive = TRUE)
unlink(c("project.zip", "download_project.R", "README.md"))
## Run project building script
source("./scripts/0_build_project.R")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment