noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 107/323: Add licence + template name


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 107/323: Add licence + template name
Date: Wed, 14 Mar 2018 17:38:33 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit b92fbe41446ae7b461630bab9af772a7ee0cfd5a
Author: Dany De Bontridder <address@hidden>
Date:   Sun Jan 28 10:56:18 2018 +0100

    Add licence + template name
---
 include/sql/mod1/make-sql | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/sql/mod1/make-sql b/include/sql/mod1/make-sql
index d140cff..6e9175a 100755
--- a/include/sql/mod1/make-sql
+++ b/include/sql/mod1/make-sql
@@ -1,4 +1,12 @@
-pg_dump -O -U dany -s ${DOMAIN}mod1|grep -v "COMMENT ON SCHEMA public IS 
'Standard public schema';" |sed "/^--/d" > schema.sql
+#!/bin/bash
+# Create script for exporting a new template
+# DDB 2018-01-28
+# under GPL license
+#
+
+export TEMPLATE=${DOMAIN}mod1
+
+pg_dump -O -U dany -s $TEMPLATE|grep -v "COMMENT ON SCHEMA public IS 'Standard 
public schema';" |sed "/^--/d" > schema.sql
 awk '/SEQUENCE/,/;/  { print $0;}' < schema.sql > sequence.sql
 awk '/CREATE DOMAIN/,/;/ { print $0;}' < schema.sql > table.sql
 awk '/CREATE TABLE/,/;/ { print $0;}' < schema.sql >> table.sql
@@ -27,6 +35,6 @@ sed -i -e "/ALTER TABLE.*/d" -e "/ADD CONSTRAINT/d" -e 
"/CREATE PROCEDURAL/d" -e
 
 grep setval schema.sql >> sequence.sql
 echo "set search_path = public, comptaproc,pg_catalog ;" > data.sql
-pg_dump -O -U dany --data-only --column-inserts  -O ${DOMAIN}mod1 |sed 
"/^--/d" | sed -e "/SET search_path/d" >> data.sql
+pg_dump -O -U dany --data-only --column-inserts  -O ${TEMPLATE}|sed "/^--/d" | 
sed -e "/SET search_path/d" >> data.sql
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]