Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #64 from gvwilson/building-r
Only try building R files if there are some
  • Loading branch information
Greg Wilson authored and GitHub committed Jun 24, 2016
2 parents 05c8b44 + 2e8a6b0 commit c565218
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -78,7 +78,7 @@ HTML_DST = \

## lesson-rmd: : convert Rmarkdown files to markdown
lesson-rmd: $(RMD_SRC)
@bin/knit_lessons.sh
@bin/knit_lessons.sh $(RMD_SRC)

## lesson-check : validate lesson Markdown.
lesson-check :
Expand Down
5 changes: 4 additions & 1 deletion bin/knit_lessons.sh
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

if [ -d "_episodes_rmd" ] ; then
# Only try running R to translate files if there are some files present.
# The Makefile passes in the names of files.

if [ $# -ne 0 ] ; then
Rscript -e "source('bin/generate_md_episodes.R')"
fi

0 comments on commit c565218

Please sign in to comment.