diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
commit | b80bd744ad873f6fc43018bc4bfb90677de167bd (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /script/erd | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) |
Start of GS5.
Diffstat (limited to 'script/erd')
-rwxr-xr-x | script/erd | 38 |
1 files changed, 38 insertions, 0 deletions
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 + |