Last active
November 2, 2021 20:02
-
-
Save SimonGoring/6110c8539eeb79d310ddd07597b0b05e to your computer and use it in GitHub Desktop.
Autobuild RMarkdown presentations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Set initial time of file | |
LTIME=`stat -c %Z ./$1.Rmd` | |
while true | |
do | |
ATIME=`stat -c %Z ./$1.Rmd` | |
if [[ "$ATIME" != "$LTIME" ]] | |
then | |
Rscript -e "rmarkdown::render('$1')" | |
LTIME=$ATIME | |
fi | |
sleep 5 | |
done |
I think that index.html
and index.Rmd
needs to be changed to $1 . . .
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just run from the command line as: