#!/bin/bash

if [ ! -d tools ]; then
    echo "Must be run from the top directory"
    exit 1
fi

# Not sure why RStudio keeps changing the hashes in the knitr cache

export NOT_CRAN=true
cd tools/vignettes
for f in *.Rmd; do
  Rscript -e "library(rmarkdown); render('$f')"
done
