#!/usr/bin/env bash set -e VERSION=1.0.0 FILES=" title.txt index.md character-sheets.md character-sheets/*.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 VERSION="${VERSION}-character-sheets" FILES=" character-sheets-title.txt character-sheets.md character-sheets/*.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