5
_IGNORE_PANDOC_CROSSREF=${FALSE}
7
_FOUND_PANDOC_CROSSREF=${FALSE}
10
_PDF_NAME=libffmpeg_from_source
15
echo " Build script for the document."
17
echo "--ignore-pandoc-crossref Does not check if pandoc-crossref is"
18
echo " installed. May create errors in PDF file."
26
--ignore-pandoc-crossref)
27
_IGNORE_PANDOC_CROSSREF=${TRUE}
46
___test_pandoc___ () {
47
which pandoc > /dev/null
55
___test_pandoc_crossref___ () {
56
which pandoc-crossref > /dev/null
60
_FOUND_PANDOC_CROSSREF=${TRUE}
65
which xdg-run > /dev/null
74
___parse_args___ "${@}"
77
if [[ ${_IGNORE_PANDOC_CROSSREF} -ne ${TRUE} ]]
79
___test_pandoc_crossref___
82
if [[ ${_FOUND_PANDOC} -ne ${TRUE} ]]
85
echo -e "\e[31m pandoc not found!\e[0m"
87
echo " Please install pandoc to build the PDF."
92
if [[ ${_FOUND_PANDOC_CROSSREF} -ne ${TRUE} ]]
95
echo -e "\e[31m pandoc-crossref not found!\e[0m"
97
echo " To build properly you will need pandoc-crossref,"
98
echo "this may not not be installed by default. Please refer to"
99
echo "https://github.com/lierdakil/pandoc-crossref"
100
echo "for information on how to build and (add to \$PATH)."
102
echo " If you want to build anyway, provide the"
103
echo "--ignore-pandoc-crossref flag to the script."
104
echo "This will produce errors."
108
pandoc -F pandoc-crossref\
109
--from markdown --to pdf\
116
if [[ ${_FOUND_PANDOC} -eq ${TRUE} ]]
118
xdg-open ${_PDF_NAME}.pdf