]> granicus.if.org Git - graphviz/commitdiff
Add source for info pages to CVS
authorerg <devnull@localhost>
Tue, 15 Apr 2008 17:20:25 +0000 (17:20 +0000)
committererg <devnull@localhost>
Tue, 15 Apr 2008 17:20:25 +0000 (17:20 +0000)
doc/infosrc/mkshapes.sh [new file with mode: 0755]

diff --git a/doc/infosrc/mkshapes.sh b/doc/infosrc/mkshapes.sh
new file mode 100755 (executable)
index 0000000..8804e51
--- /dev/null
@@ -0,0 +1,32 @@
+#! /bin/ksh
+# For each name in shapelist, create a dot file using that
+# shape, then produce a gif file as output.
+
+for s in $(cat shapelist)
+do
+  F=$s.dot
+  exec 3> $F
+  echo "digraph G {" >&3
+  if [[ $s == "plaintext" || $s == "none" ]]
+  then
+    echo " node [shape=$s];" >&3
+  else
+    echo " node [style=filled,shape=$s];" >&3
+    echo " node [label=\"\"];" >&3
+  fi
+  if [[ $s == point ]]
+  then
+    echo " node [width=\"0.1\"];" >&3
+  elif [[ $s == polygon ]]
+  then
+    echo " node [sides=7]; " >&3
+  fi
+  echo " $s;" >&3
+  echo "}" >&3
+  exec 3>&-
+
+  dot -Tgif $s.dot > $s.gif
+  rm -f $s.dot
+done
+
+