summaryrefslogtreecommitdiff
path: root/controller/schema2c.sh
blob: 4f4f1647cb16967763ec72a1eee0ac7e7a760ed7 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash

# Run this file to package the .sql file into a .c file whenever the SQL changes.

rm -f schema.sql.c
echo '#define ZT_NETCONF_SCHEMA_SQL \' >schema.sql.c
cat schema.sql | sed 's/"/\\"/g' | sed 's/^/"/' | sed 's/$/\\n"\\/' >>schema.sql.c
echo '""' >>schema.sql.c