-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-test.sh
executable file
·46 lines (41 loc) · 1.13 KB
/
build-test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Get path OS agnostic
cd "$(dirname "$0")" || (echo "wrongdir" && exit 1)
directory=$(pwd) # unix
if [[ "$OSTYPE" == "msys"* ]]; then
directory=$(pwd -W) # windows
fi
directory="$directory/test-doc"
echo "current directory is: $directory"
echo "volume mapping is: $directory:/data"
docker build . --cache-from novarx/pandoc -t novarx/pandoc || exit 1
docker run --rm \
-v "$directory:/data" \
novarx/pandoc \
"*.md" \
-o convert-test-document.pdf \
-V fontsize=12pt \
-V papersize=a4paper \
--pdf-engine=xelatex \
--bibliography bib.bib \
--citeproc \
--filter=pandoc-crossref \
--filter=pandoc-plantuml \
--filter=pandoc-svg || exit 1
docker run --rm \
-v "$directory:/data" \
novarx/pandoc \
"02_part1.md" \
-t html \
-o convert-via-html-test-document.pdf \
--css="./style.css" \
--standalone \
--pdf-engine=wkhtmltopdf || exit 1
docker run --rm \
-v "$directory:/data" \
novarx/pandoc \
"02_part1.md" \
-t html \
-o convert-via-html-test-document-weasyprint.pdf \
--css="./style.css" \
--standalone \
--pdf-engine=weasyprint || exit 1