Only try building R files if there are some
[rnaseq-cwl-training.git] / bin / knit_lessons.sh
index ff5443b0b003c00668b791c0ef5a9cb0e8bd90e1..3a2395f3cf803ffaa90369936fd253ab06994e71 100755 (executable)
@@ -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