2005-06-20 14:51:48 +01:00
|
|
|
. $stdenv/setup
|
|
|
|
|
|
|
|
ensureDir $out
|
|
|
|
|
2005-06-20 15:26:07 +01:00
|
|
|
for i in $includes; do
|
2005-06-20 14:51:48 +01:00
|
|
|
if test -d $i; then
|
|
|
|
cp $i/* .
|
|
|
|
else
|
|
|
|
cp $i $(stripHash $i; echo $strippedName)
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
rootName=$(basename $(stripHash "$rootFile"; echo $strippedName))
|
|
|
|
echo "root name is $rootName"
|
|
|
|
|
|
|
|
rootNameBase=$(echo "$rootName" | sed 's/\..*//')
|
|
|
|
|
|
|
|
if test -n "$generatePDF"; then
|
|
|
|
latex=pdflatex
|
|
|
|
else
|
|
|
|
latex=latex
|
|
|
|
fi
|
|
|
|
|
|
|
|
$latex $rootName
|
|
|
|
|
|
|
|
if grep -q '\\bibitem' $rootNameBase.bbl; then
|
|
|
|
bibtex $rootNameBase
|
|
|
|
fi
|
|
|
|
|
|
|
|
$latex $rootName
|
|
|
|
|
|
|
|
makeindex $rootNameBase.idx
|
|
|
|
|
|
|
|
$latex $rootName
|
|
|
|
|
|
|
|
if test -n "$generatePDF"; then
|
|
|
|
cp $rootNameBase.pdf $out
|
|
|
|
else
|
|
|
|
cp $rootNameBase.dvi $out
|
|
|
|
fi
|