Skip to content

Commit

Permalink
fail if latexdiff fails
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisfenner committed Sep 10, 2024
1 parent 791b55c commit d7c1870
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,15 @@ if [ -n "${DIFFPDF_OUTPUT}" -o -n "${DIFFTEX_OUTPUT}" ]; then
do_md_fixups "${BUILD_DIR}/${INPUT_FILE}"
do_latex "${BUILD_DIR}/${INPUT_FILE}" "${TEMP_DIFFBASE_TEX_FILE}" "${EXTRA_PANDOC_OPTIONS} -V keepstaleimages=true"
latexdiff --preamble /resources/templates/latexdiff.tex --config /resources/templates/latexdiff.cfg --append-safecmd /resources/templates/latexdiff.safe "${TEMP_DIFFBASE_TEX_FILE}" "${TEMP_TEX_FILE}" > "${TEMP_DIFF_TEX_FILE}" 2>"${TEMP_LATEXDIFF_LOG}"
do_tex_fixups "${TEMP_DIFF_TEX_FILE}"
if [ -n "${DIFFTEX_OUTPUT}" ]; then
mkdir -p "$(dirname ${SOURCE_DIR}/${DIFFTEX_OUTPUT})"
cp "${TEMP_DIFF_TEX_FILE}" "${SOURCE_DIR}/${DIFFTEX_OUTPUT}"
if [ $? -ne 0 ]; then
FAILED=true
echo "diff output failed"
else
do_tex_fixups "${TEMP_DIFF_TEX_FILE}"
if [ -n "${DIFFTEX_OUTPUT}" ]; then
mkdir -p "$(dirname ${SOURCE_DIR}/${DIFFTEX_OUTPUT})"
cp "${TEMP_DIFF_TEX_FILE}" "${SOURCE_DIR}/${DIFFTEX_OUTPUT}"
fi
fi
fi
fi
Expand Down

0 comments on commit d7c1870

Please sign in to comment.