Template to bootstrap configure/automake projects for C++, libtool, Qt, NodeJS, PHP, Shell-Scripts, etc.
Extends autotools, by building packages for Debian and RPM, specifying generic library dependencies, creating desktop applications with icons, etc.
https://mrw.sh/development/bootstrap-build-environment
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
955 B
26 lines
955 B
9 years ago
|
#! /bin/sed -f
|
||
|
1idigraph schema {
|
||
|
|
||
|
# remove newlines
|
||
|
:a;N;$!ba;s/\n/ /g
|
||
|
|
||
|
s| *CREATE TABLE[^("'`]*[`"']\?\([a-z]\+\)[`"']\? *|\n \1\n [shape=none, margin=0, label=<\n <table>\n <tr><td colspan="3"><b>\1</b></td></tr>\n|ig
|
||
|
|
||
|
s/varchar *( *\([0-9]\+\) *)/varchar[\1]/ig
|
||
|
|
||
|
s/ *PRIMARY KEY *( *[`"']\?\([a-z]\+\)[`"']\? *) *[,)]//ig
|
||
|
|
||
|
:b;s/\([a-z]\+\)\([^;]*\)FOREIGN KEY *( *[`"']\?\([a-z]\+\)[`"']\? *) *REFERENCES *[`"']\?\([a-z]\+\)[`"'] *( *[`"']\?\([a-z]\+\)[`"']\? *) *\([^,)]*\)[,)]\(.*\)/\1\2\7\n \1:\3 -> \4:\5/ig;tb
|
||
|
|
||
|
s| *COMMENT *= *[`"']\?\([^`"']*\)[`"']\?| <tr><td colspan="3">\1</td></tr>|ig
|
||
|
|
||
|
s| *[`"']\([a-z]\+\)[`"'] *\([^,)]*\) *COMMENT *[`"']\([^`"']*\)[`"'] *[,)]| <tr><td port="\1">\1</td><td>\2</td><td>\3</td></tr>\n|ig
|
||
|
|
||
|
s/ *ENGINE *= *\w* *//ig
|
||
|
s/ *DEFAULT *CHARSET *= *\w* *//ig
|
||
|
s/ *CHARACTER *SET *=\? *\w* *//ig
|
||
|
s|;|\n </table>\n >];\n|ig
|
||
|
s/(//ig
|
||
|
|
||
|
$a}
|