English version includes solutions

This commit is contained in:
Simon Knott
2018-09-03 19:54:52 +02:00
parent 519a8bb4af
commit 6feb88700a

View File

@@ -1,5 +1,25 @@
#! /usr/bin/env sh
generate_with_solutions () {
echo "Generating English with solutions"
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
cat ./README.md >> $tmpfile
for dir in ./solutions/system_design/*; do
case $dir in *template*) continue;; esac
case $dir in *__init__.py*) continue;; esac
: [[ -d "$dir" ]] && ( cd "$dir" && cat ./README.md >> $tmpfile && echo "" >> $tmpfile )
done
cat $tmpfile | pandoc --from=markdown -o README.epub
rm "$tmpfile"
echo "Done! You can find the book at ./README.epub"
}
generate () {
name=$1
echo "Generating Ebook $name ..."
@@ -7,7 +27,7 @@ generate () {
echo "Done! You can find the book at ./$name.epub"
}
generate README
generate_with_solutions
generate README-ja
generate README-zh-Hans
generate README-zh-TW