Skip to content

Commit

Permalink
dynamically resolve latex path
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnotmitt committed Sep 25, 2020
1 parent 077e88c commit cdbfbbf
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,24 @@ if [ ! -f $1 ]; then
fi

# install packages; add latex-related packages only if enabled
PACKAGES="doxygen graphviz ttf-freefont"
if [ ! -z $3 ] ; then
if [ "$3" = true ] ; then
PACKAGES="$PACKAGES perl build-base texlive-full biblatex"
fi
BUILD_LATEX=$3 && $(grep -q GENERATE_LATEX\\s\*=\\s\*YES $1)
LATEX_DIR="$(sed -n -e 's/^OUTPUT_DIRECTORY\s*=\s*//p' Doxyfile)/$(sed -n -e 's/^LATEX_OUTPUT\s*=\s*//p' Doxyfile)"
else; then
BUILD_LATEX=0
fi

PACKAGES="doxygen graphviz ttf-freefont"
if [ "$BUILD_LATEX" = true ] ; then
PACKAGES="$PACKAGES perl build-base texlive-full biblatex"
fi
apk add $PACKAGES

# run "regular" doxygen
doxygen $1

# if enabled, make latex pdf output
if [ ! -z $3 ] ; then
if [ "$3" = true ] ; then
cd $2/docs/latex
make
fi
if [ "$BUILD_LATEX" = true ] ; then
cd $LATEX_DIR
make
fi

0 comments on commit cdbfbbf

Please sign in to comment.