donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

pg_template.sh (709B)


      1 #!/bin/sh
      2 # This file is in the public domain.
      3 #
      4 # Instantiates pg_template for a particular function.
      5 
      6 for n in $*
      7 do
      8     NCAPS=`echo $n | tr a-z A-Z`
      9     if test ! -e pg_$n.c
     10     then
     11         cat pg_template.c | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.c
     12         cat pg_template.h | sed -e s/template/$n/g -e s/TEMPLATE/$NCAPS/g > pg_$n.h
     13         echo "  plugin->$n\n    = &DH_PG_$n;" >> tmpl.c
     14         echo "#include \"pg_$n.h\"" >> tmpl.inc
     15         echo "  pg_$n.h pg_$n.c \\" >> tmpl.am
     16     fi
     17 done
     18 
     19 echo "Add lines from tmpl.am to Makefile.am"
     20 echo "Add lines from tmpl.inc to plugin_donaudb_postgres.c at the beginning"
     21 echo "Add lines from tmpl.c to plugin_donaudb_postgres.c at the end"