diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-11-02 12:17:05 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-11-02 12:17:05 +0100 |
commit | 821c87ccbddbb7b0d0896f350de0a671f210ae40 (patch) | |
tree | 39b3f7c8294ea60c436730d9d2bcaa5ec97eeab0 /src/exchangedb/pg_template.sh | |
parent | 1d483e2e17efc9fce5e2b3c27fe533e386178e3d (diff) | |
download | exchange-821c87ccbddbb7b0d0896f350de0a671f210ae40.tar.xz |
clean up exchange DB logic a bit, add missing function
Diffstat (limited to 'src/exchangedb/pg_template.sh')
-rwxr-xr-x | src/exchangedb/pg_template.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/exchangedb/pg_template.sh b/src/exchangedb/pg_template.sh index 5aa8f8d45..73bd7e989 100755 --- a/src/exchangedb/pg_template.sh +++ b/src/exchangedb/pg_template.sh @@ -6,7 +6,16 @@ for n in $* do NCAPS=`echo $n | tr a-z A-Z` - cat pg_template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.c - cat pg_template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.h - echo "\#include \"pg_$n.h\"" >> hdr.h + if test ! -e pg_$n.c + then + cat pg_template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.c + cat pg_template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.h + echo " plugin->$n\n = &TEH_PG_$n;" >> tmpl.c + echo "#include \"pg_$n.h\"" >> tmpl.inc + echo " pg_$n.h pg_$n.c \\" >> tmpl.am + fi done + +echo "Add lines from tmpl.am to Makefile.am" +echo "Add lines from tmpl.inc to plugin_exchangedb_postgres.c at the beginning" +echo "Add lines from tmpl.c to plugin_exchangedb_postgres.c at the end" |