[Builder] Improve error handling
This commit is contained in:
@@ -15,16 +15,16 @@ if [ -n "$EXTRA_PKGS" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$INSTALL_HELPERS" ]; then
|
||||
if [ "$INSTALL_HELPERS" == "true" ]; then
|
||||
CURR_DIR=$(pwd)
|
||||
mkdir ~/projects/ || true
|
||||
cd ~/projects/
|
||||
git clone https://git.janishutz.com/janishutz/latex || true
|
||||
echo "
|
||||
if [ "$INSTALL_HELPERS" == "true" ]; then
|
||||
CURR_DIR=$(pwd)
|
||||
mkdir ~/projects/ || true
|
||||
cd ~/projects/
|
||||
git clone https://git.janishutz.com/janishutz/latex || true
|
||||
echo "
|
||||
Downloaded helpers, returning to $CURR_DIR
|
||||
"
|
||||
cd "$CURR_DIR"
|
||||
fi
|
||||
cd "$CURR_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "
|
||||
@@ -38,13 +38,13 @@ echo "
|
||||
Compiling document using latexmk with extra arguments: $EXTRA_ARGS
|
||||
"
|
||||
|
||||
latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -shell-escape $EXTRA_ARGS > /tmp/log.txt
|
||||
latexmk -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -shell-escape $EXTRA_ARGS >/tmp/log.txt || compile_fail=1
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
cat /tmp/log.txt
|
||||
echo "
|
||||
if [ ${compile_fail:-0} -eq 1 ]; then
|
||||
cat /tmp/log.txt
|
||||
echo "
|
||||
==> Compile has failed. See log above
|
||||
"
|
||||
else
|
||||
echo "Compile successful, log omitted"
|
||||
echo "Compile successful, log omitted"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user