aboutsummaryrefslogtreecommitdiffstats
path: root/exampleSite/R/build.R
blob: 2fbce83e6dad12d29f2d8a14268c07ba950068fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
if (Sys.getenv('USER') != 'yihui' || Sys.which('git') == '' ||
    !grepl(
      'git@github.com:yihui/hugo-xmin.git',
      system2('git', c('remote', '-v'), stdout = TRUE)
    )) q('no')

file.copy('content/_index.markdown', '../README.md', overwrite = TRUE)
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
)