CV/tests/test.sh
2018-02-07 12:59:32 +01:00

19 lines
371 B
Bash
Executable File

#!/usr/bin/env bash
cd $1
echo $(pwd)
ls -la
# remove main.pdf
[ -f main.pdf ] && rm main.pdf || echo "continue without remove"
# test if main.pdf is removed
[ -f main.pdf ] && exit 1 || echo "continue building pdf output"
# build pdf from source
pdflatex main.tex
# exit successfully if pdf present or with error if not present
[ -f main.pdf ] && exit 0 || exit 1