From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- script/erd | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 script/erd (limited to 'script/erd') diff --git a/script/erd b/script/erd new file mode 100755 index 0000000..5ba938c --- /dev/null +++ b/script/erd @@ -0,0 +1,38 @@ +#! /bin/sh + +echo "" +echo "### Generating Dot file ..." +bundle exec \ + rake erd filetype=dot \ + attributes=content,foreign_keys \ + indirect=true \ + orientation=horizontal \ + notation=simple + +if which dot; then + echo "" + echo "### Generating PDF file (via dot) ..." + dot -Tpdf:quartz:quartz -o ERD.pdf ERD.dot +else + if which graphviz; then + echo "" + echo "### Generating PDF file (via graphviz) ..." + bundle exec \ + rake erd filetype=pdf \ + attributes=content,foreign_keys \ + indirect=true \ + orientation=horizontal \ + notation=simple + else + echo "No dot no PDF." + fi +fi + +if which dot; then + echo "" + echo "### Generating PNG file (via dot) ..." + dot -Tpng:quartz:quartz -o ERD.png ERD.dot +else + echo "No dot no PNG." +fi + -- cgit v1.2.3