google-sre-ebook/bootstrap.sh
Caleb Mingle 2ff063e9b3 Add support for building eBook with Docker
This change adds support for building the eBook with Docker. Supporting Docker means
that users who want to build the eBook do not have to install Ruby/Bundler/Calibre in their
environments.

I'm a Docker n00b, so if there's a better way to handle file permissions on the output, I'm all
ears.

Build tested on Linux. Outputs were fine.

There is also a change to the pandoc outputs. It seems the `+smart` extension is not supported for epub/html[0]
in their latest versions.

[0] - https://pandoc.org/MANUAL.html#extension-smart
2018-05-15 10:41:05 -07:00

19 lines
414 B
Bash
Executable File

#!/bin/bash
rm -rf html
mkdir -p html
cd html
wget --convert-links --mirror https://landing.google.com/sre/book/
mv landing.google.com/sre/book/* .
rm -rf landing.google.com
cd ..
bundle install
ruby generate.rb
pushd html/chapters
pandoc -f html -t epub -o ../../google-sre.epub --epub-metadata=../../metadata.xml --epub-cover-image=../../cover.jpg sre.html
popd
ebook-convert google-sre.epub google-sre.mobi