Debian Codegraph @

R/license.R

raw
1
2 # used to generate the CRAN-compatible license file in R CMD build
3 renv_license_generate <- function() {
4
5 # only done if we're building
6 if (!building())
7 return(FALSE)
8
9 contents <- c(
10 paste("YEAR:", format(Sys.Date(), "%Y")),
11 "COPYRIGHT HOLDER: Posit Software, PBC"
12 )
13
14 writeLines(contents, con = "LICENSE")
15 return(TRUE)
16
17 }
18
19 if (identical(.packageName, "renv"))
20 renv_license_generate()
21