R/zzz.R

.isScriptInstalled <- function()
{
    if (nchar(Sys.which("BiocCheck")))
        return(TRUE)

    onWindows <- (.Platform$OS.type == "windows")

    if (onWindows)
        file <- "BiocCheck.bat"
    else
        file <- "BiocCheck"

    path <- file.path(Sys.getenv("R_HOME"), "bin")

    all(file.exists(file.path(path, file)))

}

.onLoad <- function(libname, pkgname)
{
    if (.isScriptInstalled())
        return()
    .installScript()
}
dtenenba/BiocCheck documentation built on May 15, 2019, 4:53 p.m.