-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathMakefile
45 lines (33 loc) · 1.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
all: render-pdf render-epub render-gitbook
shell:
docker run --platform linux/x86_64 --memory="18g" -it -v $(shell pwd):/book -w /book --entrypoint=bash $(DOCKER_USERNAME)/statsthinking21
clean:
rm -rf _bookdown_files bookdown-demo.*
render-gitbook:
cp _gitbook_99-References.Rmd 99-References.Rmd
echo "bookdown::render_book('index.Rmd', 'bookdown::gitbook')" | R --no-save
rm 99-References.Rmd
render-epub-mathjax:
cp _gitbook_99-References.Rmd 99-References.Rmd
echo "bookdown::render_book('index.Rmd', 'bookdown::epub_book',pandoc_args='--mathjax')" | R --no-save
rm 99-References.Rmd
render-epub:
cp _gitbook_99-References.Rmd 99-References.Rmd
echo "bookdown::render_book('index.Rmd', 'bookdown::epub_book',)" | R --no-save
rm 99-References.Rmd
render-pdf:
echo "rendering pdf - TBD"
cp _latex_99-References.Rmd 99-References.Rmd
echo "bookdown::render_book('index.Rmd', 'bookdown::pdf_book')" | R --no-save
rm 99-References.Rmd
render-pdf-docker:
docker run -it -v $(shell pwd):/book -w /book --entrypoint="" $(DOCKER_USERNAME)/statsthinking21 make render-pdf
render-gitbook-docker:
docker run -it -v $(shell pwd):/book -w /book --entrypoint="" $(DOCKER_USERNAME)/statsthinking21 make render-gitbook
pkgsetup:
cd setup && python get_packages.py
git add setup/package_installs.R
git commit -m"update packages"
git push
pkginstall:
Rscript setup/package_installs.R