#/bin/bash
find . -name "*.Rmd" -exec sed -i 's/library("exams2moodle")/library("exams.forge")\ninstruction <- NULL/g' {} \;
find . -name "*.Rmd" -exec sed -i "s/library('exams2moodle')/library('exams.forge')\ninstruction <- NULL/g" {} \;
find . -name "*.Rmd" -exec sed -i 's/child=paste0.*\}/error=TRUE, child=instruction\}/g' {} \;
find . -name "*.Rmd" -exec sed -i 's/data(sos)/data(sos100, package = "exams.forge.data")/g' {} \;
find . -type f -exec sh -c 'tail -c 1 "{}" | grep -q . && sed -i -e "$ a\\" "{}"' \;
find . -name "*.Rmd" -exec sed -i 's/`r if(exists("story")) story else knitr::current_input()`/`r knitr::current_input()`/g' {} \;





```{r data generation, echo = FALSE, results = "hide"}
instruction <- NULL
```

