commit db32aebefcdc19b5f7e045f712bb481ce29a072c parent 41594e06f363996b2df6e6698f376f09ecd95aea Author: Christian Grothoff <grothoff@gnunet.org> Date: Sun, 12 Apr 2026 19:07:49 +0200 fix template scripts Diffstat:
| M | src/auditordb/pg_template.sh | | | 12 | +++--------- |
| M | src/exchangedb/pg_template.sh | | | 14 | ++++---------- |
2 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/src/auditordb/pg_template.sh b/src/auditordb/pg_template.sh @@ -6,16 +6,10 @@ for n in $* do NCAPS=`echo $n | tr a-z A-Z` - if test ! -e pg_$n.c + if test ! -e $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 = &TAH_PG_$n;" >> tmpl.c - echo "#include \"pg_$n.h\"" >> tmpl.inc - echo " pg_$n.h pg_$n.c \\" >> tmpl.am + cat template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > $n.c + cat template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > ../include/auditor-database/$n.h fi done -echo "Add lines from tmpl.am to Makefile.am" -echo "Add lines from tmpl.inc to plugin_auditordb_postgres.c at the beginning" -echo "Add lines from tmpl.c to plugin_auditordb_postgres.c at the end" diff --git a/src/exchangedb/pg_template.sh b/src/exchangedb/pg_template.sh @@ -1,21 +1,15 @@ #!/bin/sh # This file is in the public domain. # -# Instantiates pg_template for a particular function. +# Instantiates template for a particular function. for n in $* do NCAPS=`echo $n | tr a-z A-Z` - if test ! -e pg_$n.c + if test ! -e $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 + cat template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > $n.c + cat template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > ../include/exchange-database/$n.h 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"