R/licensing.R

Defines functions license_message get_license

get_license <- function(pkg){

  license = packageDescription(pkg, fields="License")
  authors = packageDescription(pkg, fields = "Author")

  list(license = license, authors = authors)
}

license_message <- function(pkg){
  license = get_license(pkg)

  cat(crayon::cyan("\n", pkg,
                   " is licensed: ",
                   license$license,
                   "\n and is by:\n ",
                   license$authors,"\n"))


}
moodymudskipper/burglr documentation built on Dec. 21, 2021, 9:02 p.m.