31 lines
547 B
Bash
31 lines
547 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
VERSION=0.3
|
||
|
FILES="
|
||
|
title.txt
|
||
|
index.md
|
||
|
"
|
||
|
|
||
|
pandoc \
|
||
|
-o ../out/the_source-${VERSION}.epub \
|
||
|
--toc \
|
||
|
--toc-depth=2 \
|
||
|
--wrap=preserve \
|
||
|
--epub-chapter-level=2 \
|
||
|
--resource-path=. \
|
||
|
$FILES
|
||
|
|
||
|
pandoc \
|
||
|
-o ../out/the_source-${VERSION}.pdf \
|
||
|
--include-in-header sectionpagebreak.tex \
|
||
|
--variable=subparagraph \
|
||
|
--toc \
|
||
|
--toc-depth=2 \
|
||
|
--pdf-engine xelatex \
|
||
|
--resource-path=. \
|
||
|
$FILES
|
||
|
|
||
|
ebook-convert ../out/the_source-${VERSION}.epub ../out/the_source-${VERSION}.mobi
|