From 9a2a5d3b7c8ece5254387f6b2b53910e452c608c Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 7 May 2021 10:19:25 +0000 Subject: [PATCH] Prevent failure if entrypoint has "false" --- entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 606747a..4f82375 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh -e +#!/bin/sh -xe # execute doxygen # $1 is the path to the Doxyfile @@ -18,8 +18,9 @@ if [ ! -f $1 ]; then fi # install packages; add latex-related packages only if enabled -if [ ! -z $3 ] ; then - BUILD_LATEX=$3 && $(grep -q GENERATE_LATEX\\s\*=\\s\*YES $1) +if [ ! -z $3 ] && $3; then + # Only enable BUILD_LATEX if specified in doxyfile + grep -q GENERATE_LATEX\\s\*=\\s\*YES $1 && BUILD_LATEX=true || BUILD_LATEX=false LATEX_DIR="./$(sed -n -e 's/^OUTPUT_DIRECTORY\s*=\s*//p' $1)/$(sed -n -e 's/^LATEX_OUTPUT\s*=\s*//p' $1)" else BUILD_LATEX=0