summary refs log tree commit diff
path: root/pkgs/tools/typesetting/tex/nix/animatedot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/typesetting/tex/nix/animatedot.sh')
-rw-r--r--pkgs/tools/typesetting/tex/nix/animatedot.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/nix/animatedot.sh b/pkgs/tools/typesetting/tex/nix/animatedot.sh
new file mode 100644
index 000000000000..2e1868d4bebd
--- /dev/null
+++ b/pkgs/tools/typesetting/tex/nix/animatedot.sh
@@ -0,0 +1,9 @@
+source $stdenv/setup
+
+ensureDir $out
+
+for ((i = 1; i <= $nrFrames; i++)); do
+    echo "producing frame $i...";
+    targetName=$out/$(basename $(stripHash $dotGraph; echo $strippedName) .dot)-f-$i.dot
+    cpp -DFRAME=$i < $dotGraph > $targetName
+done