Build old latex documents
This commit is contained in:
parent
9642a8a944
commit
8900332581
1 changed files with 28 additions and 0 deletions
28
scripts/prefix/bin/latex2pdf.sh
Executable file
28
scripts/prefix/bin/latex2pdf.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [[ $# -lt 1 ]]
|
||||||
|
then
|
||||||
|
echo "This script requires a .tex file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
FILENAME=$(basename $1 .tex)
|
||||||
|
|
||||||
|
if ! latex ${FILENAME}.tex
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dvips -t a4 ${FILENAME}.dvi
|
||||||
|
then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! ps2pdf ${FILENAME}.ps
|
||||||
|
then
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm ${FILENAME}.dvi
|
||||||
|
rm ${FILENAME}.ps
|
||||||
|
rm ${FILENAME}.log
|
||||||
|
rm ${FILENAME}.aux
|
Loading…
Reference in a new issue