summary refs log tree commit diff
path: root/pkgs/tools/typesetting/tex/nix/dot2ps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/typesetting/tex/nix/dot2ps.sh')
-rw-r--r--pkgs/tools/typesetting/tex/nix/dot2ps.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/nix/dot2ps.sh b/pkgs/tools/typesetting/tex/nix/dot2ps.sh
new file mode 100644
index 000000000000..1269108d6f52
--- /dev/null
+++ b/pkgs/tools/typesetting/tex/nix/dot2ps.sh
@@ -0,0 +1,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
+