about summary refs log tree commit diff stats
path: root/exampleSite/R
diff options
context:
space:
mode:
authorYihui Xie2017-10-08 09:23:40 -0500
committerYihui Xie2017-10-08 09:23:40 -0500
commitffa1147b46cfdf04c9674eb420183bdd78f07a55 (patch)
tree0782457a0659703e7fb3647e538c95a6f90097d8 /exampleSite/R
parent11ad2599ed983b8749fb2ce7f0a19f998c2998dd (diff)
downloadhugo-xmin-ffa1147b46cfdf04c9674eb420183bdd78f07a55.tar.lz
hugo-xmin-ffa1147b46cfdf04c9674eb420183bdd78f07a55.tar.zst
hugo-xmin-ffa1147b46cfdf04c9674eb420183bdd78f07a55.zip
bash and sed may not be available on Windows
Diffstat (limited to 'exampleSite/R')
-rw-r--r--exampleSite/R/build.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/exampleSite/R/build.R b/exampleSite/R/build.R
index 4747bd1..78c3e56 100644
--- a/exampleSite/R/build.R
+++ b/exampleSite/R/build.R
@@ -1,5 +1,5 @@
 file.copy('content/_index.markdown', '../README.md', overwrite = TRUE)
-system("sed -i '' -e '1,6d' -e '34,38d' ../README.md")
+if (Sys.which('sed') != '') system("sed -i '' -e '1,6d' -e '34,38d' ../README.md")
 cat(
   '[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.name)\n',
   file = '../README.md', append = TRUE