forked from faisalmemon/ios-crash-dump-analysis-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildBook.sh
executable file
·33 lines (25 loc) · 1.61 KB
/
buildBook.sh
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
#!/bin/bash
./commatrademark.sh > trademarks.md
rm foo.*
# We allow first person in the preface and second person in the Introduction.
# Elsewhere it is third person only.
echo Usages of "you" in the narrative
grep --color you $(cat frontPages.txt mainPages.txt | egrep -v 'Introduction|Preface|Acknowledgements') -c | grep --color -v hammer | grep -i --color -v layout
echo
grep --color you $(cat frontPages.txt mainPages.txt | egrep -v 'Introduction|Preface|Acknowledgements') | grep --color -v hammer | grep -i --color -v layout
pandoc $(cat frontPages.txt mainPages.txt) pandocMetaData.yaml -f markdown+smart --standalone --bibliography bibliography.bib --toc -c style/gitHubStyle.css -o foo.html
pandoc $(cat frontPages_latex.txt mainPages.txt) pandocMetaData.yaml -f markdown+smart --standalone --bibliography bibliography.bib --toc --template=style/styleToCreateIndex.latex -V documentclass=book -o boo.latex
pdflatex boo.latex > boo.pass.0.log
pdflatex boo.latex > boo.pass.1.log
pdflatex boo.latex > boo.pass.2.log
pandoc $(cat frontPages.txt mainPages.txt) pandocMetaData.yaml -f markdown+smart --standalone --bibliography bibliography.bib --toc --css=style/ebook.css -o foo.epub
pandoc $(cat frontPages.txt mainPages.txt) pandocMetaData.yaml -f markdown+smart --standalone --bibliography bibliography.bib --reference-doc=style/referenceWordDocumentTemplate.docx -o foo.docx
mkdir -p docs
cp foo.html docs/index.html
git add docs/index.html
rm -rf docs/screenshots docs/style
cp -pr screenshots docs/screenshots
cp -pr style docs/style
git add docs/screenshots docs/style
git commit -m'update published book on github pages'
git push