Skip to content

Commit

Permalink
Copy files with overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Jan 18, 2016
1 parent 896c9ec commit 40f8e65
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -36,7 +36,7 @@ clean:
vignettes:
(cd docs; remake install_vignettes)

staticdocs:
staticdocs: vignettes
@mkdir -p inst/staticdocs
Rscript -e "library(methods); staticdocs::build_site()"
rm -f vignettes/*.html
Expand Down
7 changes: 3 additions & 4 deletions docs/R/vignettes.R
Expand Up @@ -26,10 +26,9 @@ build_vignettes <- function(cleanup=FALSE) {
copy <- c("figures", "figure",
"mee.bst", "suppmat.sty", "refs.bib",
"growth_model_pars_core.tex", "growth_model_pars_hyper.tex")
if (cleanup) {
unlink(file.path(dest, copy), recursive=TRUE)
} else {
file.copy(copy, dest, recursive=TRUE)
unlink(file.path(dest, copy), recursive=TRUE)
if (!cleanup) {
file.copy(copy, dest, recursive=TRUE, overwrite=TRUE)
devtools::build_vignettes()
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/remake.yml
Expand Up @@ -157,9 +157,9 @@ targets:
- ./suppmat.sty

vignettes/demography.Rnw:
command: file.copy("demography.tex", target_name)
command: file.copy("demography.tex", target_name, overwrite=TRUE)
vignettes/physiology.Rnw:
command: file.copy("physiology.tex", target_name)
command: file.copy("physiology.tex", target_name, overwrite=TRUE)
vignettes/plant.Rmd:
command: patch_md("plant.md", target_name)
vignettes/equilibrium.Rmd:
Expand Down

0 comments on commit 40f8e65

Please sign in to comment.