Update build script to output more error and code cleanup
This commit is contained in:
parent
c01a1d3dcd
commit
803eb727ba
1 changed files with 38 additions and 27 deletions
25
build.sh
25
build.sh
|
@ -108,10 +108,21 @@ operate_replacements() {
|
|||
}
|
||||
|
||||
build_pdf_book() {
|
||||
if which "rubber" > /dev/null; then
|
||||
rubber -d $1 > /dev/null 2> /dev/null
|
||||
else
|
||||
pdflatex -halt-on-error "$1".tex > /dev/null && makeindex "$1".idx > /dev/null 2> /dev/null && pdflatex -halt-on-error "$1".tex >/dev/null
|
||||
pdflatex -halt-on-error "$1".tex > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error while compiling the LaTeX file for $1"
|
||||
exit 5
|
||||
fi
|
||||
makeindex "$1".idx > /dev/null 2> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error while generating the index file for $1"
|
||||
exit 6
|
||||
fi
|
||||
|
||||
pdflatex -halt-on-error "$1".tex >/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error while compiling the LaTeX file for $1"
|
||||
exit 5
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -127,13 +138,13 @@ fi
|
|||
|
||||
# We have to garantee that the destination folders will be there ...
|
||||
if [ ! -d $INDIVID_FOLDER ]; then
|
||||
makedir $INDIVID_FOLDER
|
||||
mkdir $INDIVID_FOLDER
|
||||
fi
|
||||
if [ ! -d $INDIVID_FOLDER_PDF ]; then
|
||||
makedir $INDIVID_FOLDER_PDF
|
||||
mkdir $INDIVID_FOLDER_PDF
|
||||
fi
|
||||
if [ ! -d $MERGE ]; then
|
||||
makedir $MERGE
|
||||
mkdir $MERGE
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue