Last active
November 26, 2017 12:50
-
-
Save curtisalexander/fe66baeb4d37842ddae5d78c78370b92 to your computer and use it in GitHub Desktop.
Windows batch file to accompany _watch-render-site or _watch-render-rmd in lieu of a *nix shebang
This file contains hidden or 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
@echo off | |
cls | |
C: | |
PATH C:\Program Files\R\R~\bin;%PATH% | |
:: pushd required in the event that the _watch-render-site.R or | |
:: _watch-render-rmd.R script is on a network drive | |
@pushd %~dp0 | |
:: reads .Renviron as it sets the environment variable RSTUDIO_PANDOC | |
:: which is the PATH to pandoc | |
cmd /c Rscript --no-site-file --no-init-file --no-restore _watch-render.R --patt=".+\.Rmd" | |
@popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment