OpenCorePkg/Docs/BuildDocs.tool
2020-03-14 07:10:46 +03:00

36 lines
850 B
Bash
Executable File

#!/bin/bash
abort() {
echo "ERROR: $1!"
exit 1
}
cd "$(dirname "$0")" || abort "Wrong directory"
if [ "$(which latexdiff)" = "" ]; then
abort "latexdiff is missing, check your TeX Live installation"
fi
if [ "$(which pdflatex)" = "" ]; then
abort "pdflatex is missing, check your TeX Live installation"
fi
rm -f *.aux *.log *.out *.pdf *.toc
pdflatex Configuration.tex || \
abort "Unable to create configuration pdf"
pdflatex Configuration.tex || \
abort "Unable to create configuration pdf with TOC"
cd Differences || abort "Unable to process annotations"
rm -f *.aux *.log *.out *.pdf *.toc
latexdiff -s ONLYCHANGEDPAGE PreviousConfiguration.tex ../Configuration.tex \
> Differences.tex || \
abort "Unable to differentiate"
pdflatex -interaction=nonstopmode Differences
pdflatex -interaction=nonstopmode Differences
exit 0