#!/usr/bin/env bash # Uses https://gitlab.wgtn.cat-it.co.nz/nickg/pandoc-catalyst-template # to build Markdown -> LaTeX -> PDF BASE_DIR=$(dirname $(dirname $0)) cp $BASE_DIR/docs/template.md $BASE_DIR/docs/userguide.md cat $BASE_DIR/README.md >> $BASE_DIR/docs/userguide.md sed -i 's/docs\///' $BASE_DIR/docs/userguide.md docker run \ --rm \ -v $BASE_DIR/docs:/source \ -w /source \ -u $(id -u):$(id -g) \ gitlab.wgtn.cat-it.co.nz:4567/nickg/pandoc-catalyst-template:latest \ convert userguide.md mv $BASE_DIR/docs/userguide.md.pdf $BASE_DIR/docs/rightplant-documentation.pdf rm -f $BASE_DIR/docs/userguide.md