Skip to content
Snippets Groups Projects
Commit 926c4d89 authored by François Michonneau's avatar François Michonneau
Browse files

check knitr version before converting Rmd to md

on a suggestion of @sritchie73 and @aammd
parent 3dbfc022
Branches
Tags
No related merge requests found
......@@ -62,7 +62,8 @@ motivation.html : motivation.md _layouts/slides.revealjs Makefile
-o $@ $<
# Pattern to convert R Markdown to Markdown.
%.md: %.Rmd $(R_CHUNK_OPTS)
%.md: %.Rmd $(R_CHUNK_OPTS) tools/check_knitr_version.R
Rscript -e "source('tools/check_knitr_version.R')"
Rscript -e "knitr::knit('$$(basename $<)', output = '$$(basename $@)')"
## commands : Display available commands.
......
if (require("knitr")) {
if (packageVersion("knitr") < '1.9.19') {
stop("knitr must be version 1.9.20 or higher")
}
} else stop("knitr 1.9.20 or above is needed to build the lessons.")
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