check for android and cordova separately; depend on npm and nodejs for cordova
This commit is contained in:
		@@ -90,16 +90,19 @@ AC_DEFUN([AX_ADD_MAKEFILE_TARGET_DEP], [
 | 
			
		||||
  fi
 | 
			
		||||
])
 | 
			
		||||
 | 
			
		||||
# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS
 | 
			
		||||
# Same as AC_SUBST, but adds -Dname="value" option to CPPFLAGS and a
 | 
			
		||||
# notz only a @name@ replacement, but also a @name_ENCODED@ one to be
 | 
			
		||||
# used in code.
 | 
			
		||||
#  - parameters:
 | 
			
		||||
#     $1 = variable name
 | 
			
		||||
AC_DEFUN([AX_SUBST], [
 | 
			
		||||
  [$1]_ENCODED=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,')
 | 
			
		||||
  [$1]_ENCODED=${[$1]_ENCODED//\"/\\\"}
 | 
			
		||||
  [$1]_ENCODED=${[$1]_ENCODED//\'/\'\"\'\"\'}
 | 
			
		||||
  [$1]_ENCODED=${[$1]_ENCODED//#/\\#}
 | 
			
		||||
  AM_CPPFLAGS+=" '-D$1=\"${[$1]_ENCODED}\"'"
 | 
			
		||||
  AC_SUBST([$1])
 | 
			
		||||
  tmp_var=$(echo "${$1}" | awk 1 ORS='\\n' | sed 's,\\n$,,')
 | 
			
		||||
  tmp_var=${tmp_var//\"/\\\"}
 | 
			
		||||
  tmp_var=${tmp_var//\'/\'\"\'\"\'}
 | 
			
		||||
  tmp_var=${tmp_var//#/\\#}
 | 
			
		||||
  AM_CPPFLAGS+=" '-D$1=\"${tmp_var}\"'"
 | 
			
		||||
  AC_SUBST([$1]_ENCODED)
 | 
			
		||||
  AC_SUBST(AM_CPPFLAGS)
 | 
			
		||||
])
 | 
			
		||||
 | 
			
		||||
@@ -167,14 +170,18 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
 | 
			
		||||
  AX_SUBST(BUILD_NUMBER)
 | 
			
		||||
  BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z")
 | 
			
		||||
  AX_SUBST(BUILD_DATE)
 | 
			
		||||
  if test -f "${PROJECT_NAME}-logo.png"; then
 | 
			
		||||
     PROJECT_LOGO="${PROJECT_NAME}-logo.png"
 | 
			
		||||
  if test -f "${PACKAGE_NAME}.desktop.in"; then
 | 
			
		||||
     PACKAGE_DESKTOP="${PACKAGE_NAME}.desktop"
 | 
			
		||||
  fi
 | 
			
		||||
  AX_SUBST(PROJECT_LOGO)
 | 
			
		||||
  if test -f "${PROJECT_NAME}-icon.png"; then
 | 
			
		||||
     PROJECT_ICON="${PROJECT_NAME}-icon.png"
 | 
			
		||||
  AX_SUBST(PACKAGE_DESKTOP)
 | 
			
		||||
  if test -f "${PACKAGE_NAME}-logo.png"; then
 | 
			
		||||
     PACKAGE_LOGO="${PACKAGE_NAME}-logo.png"
 | 
			
		||||
  fi
 | 
			
		||||
  AX_SUBST(PROJECT_ICON)
 | 
			
		||||
  AX_SUBST(PACKAGE_LOGO)
 | 
			
		||||
  if test -f "${PACKAGE_NAME}-icon.png"; then
 | 
			
		||||
     PACKAGE_ICON="${PACKAGE_NAME}-icon.png"
 | 
			
		||||
  fi
 | 
			
		||||
  AX_SUBST(PACKAGE_ICON)
 | 
			
		||||
 | 
			
		||||
  AC_ARG_ENABLE(pedantic,
 | 
			
		||||
    [AS_HELP_STRING([--enable-pedantic],
 | 
			
		||||
@@ -203,6 +210,10 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
 | 
			
		||||
  else
 | 
			
		||||
    AM_CPPFLAGS="${AM_CPPFLAGS} -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG"
 | 
			
		||||
  fi
 | 
			
		||||
  
 | 
			
		||||
  if test -f ${PACKAGE_NAME}.desktop.in; then
 | 
			
		||||
    AC_CONFIG_FILES([${PACKAGE_NAME}.desktop])
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  AC_CONFIG_FILES([makefile])
 | 
			
		||||
  AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in])
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										35
									
								
								bootstrap.sh
									
									
									
									
									
								
							
							
						
						
									
										35
									
								
								bootstrap.sh
									
									
									
									
									
								
							@@ -112,11 +112,13 @@ GENERATED FILES
 | 
			
		||||
    * build-resource-file.sh - build resource.qrc file from a resource directory
 | 
			
		||||
    * sql-to-dot.sed - script to convert SQL schema files to graphviz dot in doxygen
 | 
			
		||||
    * mac-create-app-bundle.sh - script to create apple mac os-x app-bundle
 | 
			
		||||
    * test/runtests.sh - template file to run test scripts, i.e. docker based
 | 
			
		||||
    * AUTHORS - replace your name in AUTHORS before first run
 | 
			
		||||
    * NEWS - empty file add your project's news
 | 
			
		||||
    * README - add project description (first line is header, followed by an empty line)
 | 
			
		||||
    * configure.ac - global configuration file template
 | 
			
		||||
    * makefile.am - global makefile template
 | 
			
		||||
    * ${DEFAULT_PROJECT_NAME}.desktop.in - linux desktop file
 | 
			
		||||
    * src/makefile.am - if you enabled AX_USE_CXX
 | 
			
		||||
    * src/version.hxx - if you enabled AX_USE_CXX
 | 
			
		||||
    * src/version.cxx - if you enabled AX_USE_CXX
 | 
			
		||||
@@ -197,7 +199,7 @@ FILES
 | 
			
		||||
                  <ou can access the readme by calling
 | 
			
		||||
                  ${DEFAULT_PROJECT_NAME}::description().
 | 
			
		||||
  * ChangeLog:    Your changelog is automatically maintained from
 | 
			
		||||
                  subversion history, using svn2cl | subversion-tools. You don't need to
 | 
			
		||||
                  subversion history, using svn2cl. You don't need to
 | 
			
		||||
                  care about.
 | 
			
		||||
  * configure.ac: This file becomes very short and simple. You provide
 | 
			
		||||
                  the project name, the major and minor version. The
 | 
			
		||||
@@ -321,7 +323,7 @@ checkdir() {
 | 
			
		||||
 | 
			
		||||
checkfile() {
 | 
			
		||||
    exists=0
 | 
			
		||||
    if test -f "$1"; then
 | 
			
		||||
    if test -f "$1" -o -f "$1".in; then
 | 
			
		||||
        exists=1
 | 
			
		||||
    fi
 | 
			
		||||
    test $exists -eq 1
 | 
			
		||||
@@ -705,10 +707,10 @@ namespace NAMESPACE {
 | 
			
		||||
    return README;
 | 
			
		||||
  }
 | 
			
		||||
  std::string logo() {
 | 
			
		||||
    return PROJECT_LOGO;
 | 
			
		||||
    return PACKAGE_LOGO;
 | 
			
		||||
  }
 | 
			
		||||
  std::string icon() {
 | 
			
		||||
    return PROJECT_ICON;
 | 
			
		||||
    return PACKAGE_ICON;
 | 
			
		||||
  }
 | 
			
		||||
  const std::string WHAT("#(@) " PACKAGE_STRING);
 | 
			
		||||
  const std::string IDENT("\$Id: " PACKAGE_STRING);
 | 
			
		||||
@@ -720,6 +722,7 @@ ${HEADER}dist_bin_SCRIPTS =
 | 
			
		||||
MAINTAINERCLEANFILES = makefile.in
 | 
			
		||||
EOF
 | 
			
		||||
echo "${HEADER}MAINTAINERCLEANFILES = makefile.in" | to --condition AX_USE_DOXYGEN doc/makefile.am
 | 
			
		||||
to --condition AX_BUILD_TEST test/runtests.sh < ${0%/*}/test/runtests.sh
 | 
			
		||||
to --condition 'AX_BUILD_TEST|AX_USE_CPPUNIT' test/makefile.am <<EOF
 | 
			
		||||
${HEADER}$(if testtag AX_USE_CXX; then
 | 
			
		||||
cat <<EOF2
 | 
			
		||||
@@ -763,7 +766,7 @@ if testtag AX_USE_DOXYGEN; then
 | 
			
		||||
        doxyreplace PROJECT_NAME "@PACKAGE_NAME@"
 | 
			
		||||
        doxyreplace PROJECT_NUMBER "@PACKAGE_VERSION@"
 | 
			
		||||
        doxyreplace PROJECT_BRIEF "@DESCRIPTION@"
 | 
			
		||||
        doxyreplace PROJECT_LOGO "@PROJECT_LOGO@"
 | 
			
		||||
        doxyreplace PROJECT_LOGO "@top_srcdir@/@PACKACE_LOGO@"
 | 
			
		||||
        doxyreplace INLINE_INHERITED_MEMB YES
 | 
			
		||||
        doxyreplace MULTILINE_CPP_IS_BRIEF YES
 | 
			
		||||
        doxyreplace TAB_SIZE 2
 | 
			
		||||
@@ -773,6 +776,7 @@ if testtag AX_USE_DOXYGEN; then
 | 
			
		||||
        doxyadd ALIASES '"classmutex=\\par Reentrant:\\nAccess is locked with class static mutex @c "'
 | 
			
		||||
        doxyadd ALIASES '"instancemutex=\\par Reentrant:\\nAccess is locked with per instance mutex @c "'
 | 
			
		||||
        doxyadd ALIASES '"mutex=\\par Reentrant:\\nAccess is locked with mutex @c "'
 | 
			
		||||
        doxyadd ALIASES '"api=\\xrefitem api \\"API Call\\" \\"\\""'
 | 
			
		||||
        doxyreplace ENABLE_PREPROCESSING YES
 | 
			
		||||
        doxyreplace MACRO_EXPANSION YES
 | 
			
		||||
        doxyadd PREDEFINED '"NAMESPACE=@PACKAGE_NAME@"'
 | 
			
		||||
@@ -824,7 +828,7 @@ if testtag AX_USE_DOXYGEN; then
 | 
			
		||||
        doxyreplace CLASS_GRAPH YES
 | 
			
		||||
        doxyreplace TEMPLATE_RELATIONS YES
 | 
			
		||||
        doxyreplace DOT_IMAGE_FORMAT svg
 | 
			
		||||
        doxyreplace INTERACTIVE_SVG YES
 | 
			
		||||
        doxyreplace INTERACTIVE_SVG NO
 | 
			
		||||
        doxyreplace DOT_TRANSPARENT YES
 | 
			
		||||
    fi
 | 
			
		||||
fi
 | 
			
		||||
@@ -884,6 +888,17 @@ ${HEADER}%:
 | 
			
		||||
EOF
 | 
			
		||||
    echo 7 | to debian/compat
 | 
			
		||||
fi
 | 
			
		||||
to ${PACKAGE_NAME}.desktop.in <<EOF
 | 
			
		||||
[Desktop Entry]
 | 
			
		||||
Type=Application
 | 
			
		||||
Name=${PACKAGE_NAME}
 | 
			
		||||
GenericName=${PACKAGE_NAME}
 | 
			
		||||
Comment=@DESCRIPTION@
 | 
			
		||||
Icon=@prefix@/share/@PACKAGE_NAME@/@PACKAGE_ICON@
 | 
			
		||||
Exec=${PACKAGE_NAME} %u
 | 
			
		||||
Terminal=false
 | 
			
		||||
Categories=Qt;Utility;
 | 
			
		||||
EOF
 | 
			
		||||
to --condition AX_USE_RPM_PACKAGING ${PACKAGE_NAME}.spec.in <<EOF
 | 
			
		||||
Summary: @DESCRIPTION@
 | 
			
		||||
Name: @PACKAGE_NAME@
 | 
			
		||||
@@ -957,6 +972,7 @@ $(if testtag AX_USE_LIBTOOL; then
 | 
			
		||||
echo '/usr/%_lib/@PACKAGE_NAME@.so.*'
 | 
			
		||||
else
 | 
			
		||||
echo '/usr/bin/*'
 | 
			
		||||
echo '/usr/share/applications/*'
 | 
			
		||||
fi)
 | 
			
		||||
%doc
 | 
			
		||||
$(if testtag AX_USE_LIBTOOL; then
 | 
			
		||||
@@ -1027,7 +1043,10 @@ done
 | 
			
		||||
to makefile.am<<EOF
 | 
			
		||||
${HEADER}SUBDIRS =${SUBDIRS}
 | 
			
		||||
 | 
			
		||||
doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog
 | 
			
		||||
desktopdir = \${datadir}/applications
 | 
			
		||||
desktop_DATA = @PACKAGE_DESKTOP@
 | 
			
		||||
dist_pkgdata_DATA = @PACKAGE_ICON@
 | 
			
		||||
dist_doc_DATA = AUTHORS NEWS README COPYING INSTALL ChangeLog
 | 
			
		||||
 | 
			
		||||
MAINTAINERCLEANFILES = makefile.in
 | 
			
		||||
EOF
 | 
			
		||||
@@ -1052,7 +1071,7 @@ if test -f makefile; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#### Bootstrap Before Configure ####
 | 
			
		||||
run --no-check svn2cl | subversion-tools
 | 
			
		||||
run --no-check svn2cl
 | 
			
		||||
run aclocal
 | 
			
		||||
if testtag AX_USE_LIBTOOL; then run libtoolize --force; fi
 | 
			
		||||
run automake -a
 | 
			
		||||
 
 | 
			
		||||
@@ -30,9 +30,10 @@ AX_BUILD_TEST
 | 
			
		||||
#AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets])
 | 
			
		||||
#AX_QT_NO_KEYWORDS
 | 
			
		||||
 | 
			
		||||
AC_CHECK_PROG(CORDOVA, [cordova android], [1], [0],
 | 
			
		||||
AC_CHECK_PROG(ANDROID, [android], [1], [0],
 | 
			
		||||
                       [${PATH}${PATH_SEPARATOR}${ANDROID_HOME}/tools])
 | 
			
		||||
AM_CONDITIONAL(CORDOVA, [test ${CORDOVA} = "1"])
 | 
			
		||||
AC_CHECK_PROG(CORDOVA, [cordova], [1], [0])
 | 
			
		||||
AM_CONDITIONAL(CORDOVA, [test ${CORDOVA} -eq 1 -a ${ANDROID} -eq 1])
 | 
			
		||||
AX_SUBST(CORDOVA)
 | 
			
		||||
 | 
			
		||||
AC_CONFIG_FILES([html/index.html])
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								debian/control.in
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/control.in
									
									
									
									
										vendored
									
									
								
							@@ -1,7 +1,7 @@
 | 
			
		||||
Source: @PACKAGE_NAME@
 | 
			
		||||
Priority: extra
 | 
			
		||||
Maintainer: @AUTHOR@
 | 
			
		||||
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release, doxygen, graphviz, mscgen
 | 
			
		||||
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release, doxygen, graphviz, mscgen, npm, nodejs
 | 
			
		||||
 | 
			
		||||
Package: @PACKAGE_NAME@
 | 
			
		||||
Section: web
 | 
			
		||||
 
 | 
			
		||||
@@ -1,39 +1,79 @@
 | 
			
		||||
#! /bin/sed -f
 | 
			
		||||
#! /bin/sed -nf
 | 
			
		||||
1i\
 | 
			
		||||
/** @page database Database Schema\
 | 
			
		||||
\
 | 
			
		||||
@dot\
 | 
			
		||||
digraph schema {
 | 
			
		||||
 | 
			
		||||
# remove newlines
 | 
			
		||||
:a;N;$!ba;s/\n/ /g
 | 
			
		||||
# get everithing on one single line
 | 
			
		||||
H;$!d;$x
 | 
			
		||||
 | 
			
		||||
# remove all single-line comment lines
 | 
			
		||||
s/\n--[^\n]*//g
 | 
			
		||||
 | 
			
		||||
# reduce spaces
 | 
			
		||||
s, \+, ,g
 | 
			
		||||
s,\t\| \+, ,g
 | 
			
		||||
 | 
			
		||||
s| *CREATE *TABLE *\(if *not *exists\)\? *`\?\([a-z]\+\)`\? *|\n    \2\n        [shape=none, margin=0, label=<\n            <table bgcolor="#dddddd">\n                <tr><td bgcolor="#ddddff" colspan="4"><b>\2</b></td></tr>\n|ig
 | 
			
		||||
# remove multiline comments
 | 
			
		||||
:f;s,\(.*\)/\*.*\*/[ \n]*;*,\1,g;tf
 | 
			
		||||
 | 
			
		||||
s/varchar *( *\([0-9]\+\) *)/varchar[\1]/ig
 | 
			
		||||
# remove empty lines
 | 
			
		||||
s,\n\+,\n,g
 | 
			
		||||
 | 
			
		||||
s/ *PRIMARY KEY *( *`\?\([a-z]\+\)`\? *) *[,)]//ig
 | 
			
		||||
# remove unknown commands
 | 
			
		||||
s,\(;\|\n\) *\(DELIMITER\|USE\|DROP\|CREATE[ \n]\+DATABASE\)[ \n]\+[^;]*;\+,,ig
 | 
			
		||||
 | 
			
		||||
:b;s/\([a-z]\+\)\([^;]*\)FOREIGN KEY *( *`\?\([a-z]\+\)`\? *) *REFERENCES *`\?\([a-z]\+\)`\? *( *`\?\([a-z]\+\)`\? *) *\([^,)]*\)[,)]\(.*\)/\1\2\7\n \1:\3 -> \4:\5/ig;tb
 | 
			
		||||
# convert special characters within quotes
 | 
			
		||||
:a;s/^\(\([^"]*"[^",]*"\)*[^"]*"[^"]*\),\([^"]*".*\)/\1\##COMMA##\3/g;ta
 | 
			
		||||
:c;s/^\(\([^']*'[^',]*'\)*[^']*'[^']*\),\([^']*'.*\)/\1\##COMMA##\3/g;tc
 | 
			
		||||
 | 
			
		||||
:c;s|\n[(,] *`\?\([a-z]\+\)`\? *\([^ ]\+\)*\([^,)]*\) *COMMENT *[`"']\([^`"']*\)[`"'] *[,)]|\n                <tr><td align="left" port="\1"><b>\1</b></td><td align="left">\2</td><td align="left">\3</td><td align="left">\4</td></tr>\n,|ig;tc
 | 
			
		||||
# backup everything to the buffer
 | 
			
		||||
# then analyze only on one create table
 | 
			
		||||
:i
 | 
			
		||||
h
 | 
			
		||||
s,.*\(create[ \n]\+table[^;]*;\).*,\1,ig
 | 
			
		||||
 | 
			
		||||
s| \+</td>|</td>|g
 | 
			
		||||
s|<td> \+|<td>|g
 | 
			
		||||
s|\(<td[^>]*>[^<]\{30,40\}\) \+\([^<]\{20,\}</td>\)|\1<br/>\2|g
 | 
			
		||||
:d;s|\(<br/>[^<]\{30,40\}\) \+\([^<]\{20,\}</td>\)|\1<br/>\2|g;td
 | 
			
		||||
# start html table node
 | 
			
		||||
s|CREATE[ \n]\+TABLE[ \n]\+\(if[ \n]\+not[ \n]\+exists[ \n]\+\)\?`\?\(\w\+\)`\?|    \2\n        [shape=none, margin=0, label=<\n            <table bgcolor="#dddddd">\n                <tr><td bgcolor="#ddddff" colspan="4"><b>\2</b></td></tr>|ig
 | 
			
		||||
 | 
			
		||||
s| *COMMENT *= *["']\?\([^"']*\)["']\?|\n                <tr><td bgcolor="#ddddff" colspan="4">\1</td></tr>|ig
 | 
			
		||||
# remove key definitions
 | 
			
		||||
s/[),][\n ]*\(PRIMARY[ \n]\+\)\?KEY[ \n]\+[^(]*([^)]*)//gi
 | 
			
		||||
 | 
			
		||||
s| \+</td>|</td>|g
 | 
			
		||||
s|<td> \+|<td>|g
 | 
			
		||||
s|\(<td[^>]*>[^<]\{60,80\}\) \+\([^<]\{30,\}</td>\)|\1<br/>\2|g
 | 
			
		||||
:e;s|\(<br/>[^<]\{60,80\}\) \+\([^<]\{30,\}</td>\)|\1<br/>\2|g;te
 | 
			
		||||
# move foreign keys as relation to the end
 | 
			
		||||
:b;s/\(\w\+\)\([^;]*\)FOREIGN[\n ]\+KEY[ \n]*([ \n]*`\?\([a-z]\+\)`\?[ \n]*)[ \n]*REFERENCES[ \n]*`\?\([a-z]\+\)`\?[ \n]*([ \n]*`\?\([a-z]\+\)`\?[ \n]*)[ \n]*\([^,)]*\)\([,)].*\)/\1\2\7\n \1:\3 -> \4:\5 [label="\6"]##SEMICOLON##/ig;tb
 | 
			
		||||
 | 
			
		||||
s/\n,[^\n]*/\n/g
 | 
			
		||||
s|;|\n            </table>\n        >];\n|ig
 | 
			
		||||
# create table rows
 | 
			
		||||
s|[(,][ \n]*`\?\(\w\+\)`\?[ \n]\+\(\w\+\(([^)]\+)\)\?\)[ \n]*\([^,)]*\)[ \n]\+COMMENT[ \n]*["']\([^"']*\)["'][ \n]*|\n                <tr><td align="left" port="\1"><b>\1</b></td><td align="left">\2</td><td align="left">\4</td><td align="left">\5</td></tr>|gi
 | 
			
		||||
s|[(,][ \n]*`\?\(\w\+\)`\?[ \n]\+\(\w\+\(([^)]\+)\)\?\)[ \n]*\([^,)]*\)|\n                <tr><td align="left" port="\1"><b>\1</b></td><td align="left">\2</td><td align="left">\4</td></tr>|g
 | 
			
		||||
 | 
			
		||||
# add line breaks for long lines
 | 
			
		||||
s|\(<td[^>]*>[^<]\{30,40\}\)[ \n]\+\([^<]\{20,\}</td>\)|\1<br/>\2|g
 | 
			
		||||
#:d;s|\(<br/>[^<]\{30,40\}\)[ \n]\+\([^<]\{20,\}</td>\)|\1<br/>\2|g;td
 | 
			
		||||
 | 
			
		||||
# add table comment below
 | 
			
		||||
:k;tk
 | 
			
		||||
s|[ \n]*)[^)]*COMMENT[ \n]*=[ \n]*["']\?\([^"']*\)["']\?[^;]*|\n                <tr><td bgcolor="#ddddff" colspan="4">\1</td></tr>|ig;th
 | 
			
		||||
s|)[^);]*;|\n;|ig
 | 
			
		||||
:h
 | 
			
		||||
 | 
			
		||||
# cleanup comment below, add line breaksfor long lines
 | 
			
		||||
s|\(<td[^>]*>[^<]\{60,80\}\)[ \n]\+\([^<]\{30,\}</td>\)|\1<br/>\2|g
 | 
			
		||||
#:e;s|\(<br/>[^<]\{60,80\}\)[ \n]\+\([^<]\{30,\}</td>\)|\1<br/>\2|g;te
 | 
			
		||||
 | 
			
		||||
# close table
 | 
			
		||||
s|;|\n            </table>\n        >];|ig
 | 
			
		||||
 | 
			
		||||
# convert ##COMMA## to ,
 | 
			
		||||
s|##COMMA##|,|g
 | 
			
		||||
# convert ##SEMICOLON## to ;
 | 
			
		||||
s,##SEMICOLON##,;,g
 | 
			
		||||
 | 
			
		||||
# print one table
 | 
			
		||||
p
 | 
			
		||||
# get buffer back and remove the table that has just been analyzed
 | 
			
		||||
x
 | 
			
		||||
s,\(.*\)create[ \n]\+table[^;]*;\(.*\),\1\2,ig
 | 
			
		||||
ti
 | 
			
		||||
 | 
			
		||||
$a\
 | 
			
		||||
}\
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user