Include the Sqlite schema to auto-init the database.

This commit is contained in:
Adam Ierymenko 2015-03-17 14:54:13 -07:00
commit 49a2450e76
3 changed files with 106 additions and 2 deletions

8
netconf/schema2c.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
# Run this file to package the .sql file into a .c file whenever the SQL changes.
rm -f netconf-schema.sql.c
echo '#define ZT_NETCONF_SCHEMA_SQL \' >netconf-schema.sql.c
cat netconf-schema.sql | sed 's/^/"/' | sed 's/$/\\n"\\/' >>netconf-schema.sql.c
echo '""' >>netconf-schema.sql.c