mirror of
https://github.com/luzifer-docker/xetexgen.git
synced 2024-12-20 15:51:17 +00:00
22 lines
558 B
Bash
Executable file
22 lines
558 B
Bash
Executable file
#!/bin/bash
|
|
|
|
TEXFILE=$1
|
|
|
|
if ! [ -f ${TEXFILE} ]; then
|
|
echo "You need to specify the file to render."
|
|
exit 1
|
|
fi
|
|
|
|
if ! ( xelatex -interaction=batchmode ${TEXFILE} ); then
|
|
echo "An error occurred while processing ${TEXFILE}. Please see the log."
|
|
exit 1
|
|
fi
|
|
|
|
# Do a second run in order to render page numbers etc
|
|
if ! ( xelatex -interaction=batchmode ${TEXFILE} ); then
|
|
echo "An error occurred while processing ${TEXFILE}. Please see the log."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Rendering was successful. Cleaning up..."
|
|
rm -f ${TEXFILE/.tex/.log} ${TEXFILE/.tex/.aux}
|