nixpkgs/pkgs/misc/tex/nix/dot2pdf.sh
Eelco Dolstra 473997f01c * Work around a bad Perl interpreter path.
svn path=/nixpkgs/trunk/; revision=8553
2007-04-09 23:29:00 +00:00

21 lines
433 B
Bash

source $stdenv/setup
ensureDir $out
dot2pdf() {
sourceFile=$1
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).pdf
echo "converting $sourceFile to $targetName..."
dot -Tps $sourceFile > tmp.ps
perl $(type -tp epstopdf) --outfile $targetName tmp.ps
}
for i in $dotGraph; do
if test -d $i; then
for j in $i/*; do dot2pdf $j; done
else
dot2pdf $i
fi
done