Added support for new sample-matrix markdown source files.

master
Taha Ahmed 12 years ago
parent 8f939e4d83
commit 724ebff898

@ -89,18 +89,17 @@ if [ $# -eq 1 ]; then
simpledelay.sh 2
latexmk -pdf -bibtex $jobname
fi
#echo "<cheRTeX> Calling texi2dvi()"
#R CMD texi2dvi --pdf --verbose $jobname.tex
### Perhaps the choice should be dictated from a command-line argument?
# Don't bother with this. Let latexmk take care of cleaning up
# Move unnecessary auxiliary files generated
#echo "<cheRTeX> _________________________"
#echo "<cheRTeX> ========================="
#echo "<cheRTeX> Moving auxiliary files..."
#mv *.aux logs
#mv *.log logs
#mv *.out logs
## THIS IS A QUICK-AND-DIRTY FIX FOR SAMPLE-MATRIX
# If $jobname is sample-matrix, run knitr and markdown
if [[ $jobname == "sample-matrix" ]]; then
echo "<cheRTeX> -----------------------------------------------------------"
echo "<cheRTeX> sample-matrix detected: running knit() and markdownToHTML()"
echo "<cheRTeX> -----------------------------------------------------------"
Rscript -e "library(knitr); knit(input='$jobname.Rmd', output='$jobname.md')"
Rscript -e "library(markdown); markdownToHTML('$jobname.md', '$jobname.html', stylesheet = 'custom.css')"
fi
else
# Either no arguments, or more than one argument
if [ $# -eq 0 ]; then
@ -200,6 +199,11 @@ else
if [ $Rmdfiles != 0 ]; then
cp /home/taha/chepec/tmp/$tmpdirname/*.Rmd .
fi
# Return *.css files (css files) [for sample-matrix]
cssfiles=`ls -1 /home/taha/chepec/tmp/$tmpdirname/*.css 2>/dev/null | wc -l`
if [ $cssfiles != 0 ]; then
cp /home/taha/chepec/tmp/$tmpdirname/*.css .
fi
fi
echo "Terminating..."

Loading…
Cancel
Save