Skip to content

Commit

Permalink
bash and sed may not be available on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Oct 8, 2017
1 parent 11ad259 commit ffa1147
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exampleSite/R/build.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/_index.Rmarkdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: Home

**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).

```{bash, comment='', echo=2}
```{bash, comment='', echo=2, eval=Sys.which('bash') != ''}
cd ../..;
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```
Expand Down

0 comments on commit ffa1147

Please sign in to comment.