right-tree/docs/build-pdf.sh

20 lines
637 B
Bash
Raw Normal View History

2021-12-20 11:48:23 +13:00
#!/usr/bin/env bash
# Uses https://gitlab.wgtn.cat-it.co.nz/nickg/pandoc-catalyst-template
2021-12-20 11:48:23 +13:00
# to build Markdown -> LaTeX -> PDF
BASE_DIR=$(dirname $(dirname $0))
2021-12-20 11:48:23 +13:00
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
2021-12-20 11:48:23 +13:00
docker run \
--rm \
-v $BASE_DIR/docs:/source \
-w /source \
-u $(id -u):$(id -g) \
2021-12-20 11:48:23 +13:00
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