summaryrefslogtreecommitdiff
path: root/animate
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-23 21:48:09 +0200
committerErich Eckner <git@eckner.net>2018-06-23 21:48:09 +0200
commitcf98cf2f6dd312687c649bda6484ca1cb9ba0f65 (patch)
tree2f62a7a6f688d5b456f9d958ec45e0dc2f7f14cd /animate
parent83d120a88ca5dd5a0c4679a2b6f6ea7391b0a8a7 (diff)
downloadpolyeder-cf98cf2f6dd312687c649bda6484ca1cb9ba0f65.tar.xz
Diffstat (limited to 'animate')
-rwxr-xr-xanimate19
1 files changed, 19 insertions, 0 deletions
diff --git a/animate b/animate
index 13f4793..c536001 100755
--- a/animate
+++ b/animate
@@ -1,2 +1,21 @@
#!/bin/sh
+set -e
+
+cd "$(dirname "$0")"
+
+mpost polyeder.mp
+
+find . -maxdepth 1 -name 'polyeder-*.mps' \
+ -exec convert -depth 2 "{}" "{}.bmp" \; \
+ -delete
+
+convert -delay 3 $(
+ find . -maxdepth 1 -name 'polyeder-*.mps.bmp' |
+ sed 's/^.*-\([0-9]\+\)\.mps\.bmp$/\1 \0/' | \
+ sort -k1n,1 | \
+ cut -d' ' -f2
+) polyeder.gif
+
+find . -maxdepth 1 -name 'polyeder-*.mps.bmp' \
+ -delete