summary refs log tree commit diff
path: root/pkgs/misc/tex/nix/dot2ps.sh
blob: 1269108d6f5216ddc3c1f4024cc21d3869a81a0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
source $stdenv/setup

ensureDir $out

dot2ps() {
    sourceFile=$1
    targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).ps
    echo "converting $sourceFile to $targetName..."
    dot -Tps $sourceFile > $targetName
}

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