summaryrefslogtreecommitdiffstats
path: root/pkgs/tools/typesetting/tex/nix/dot2pdf.sh
blob: c37e6a9868be7e52ee550a4ba8001cf4afaeed7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mkdir -p $out

dot2pdf() {
    sourceFile=$1
    targetName=$out/$(basename $(stripHash $sourceFile) .dot).pdf
    echo "converting $sourceFile to $targetName..."
    export FONTCONFIG_FILE=$fontsConf
    dot -Tpdf $sourceFile > $targetName
}

for i in $dotGraph; do
    if test -d $i; then
        for j in $i/*; do dot2pdf $j; done
    else
        dot2pdf $i
    fi
done