schema2c.sh 276 B

123456789
  1. #!/bin/bash
  2. # Run this file to package the .sql file into a .c file whenever the SQL changes.
  3. rm -f schema.sql.c
  4. echo '#define ZT_NETCONF_SCHEMA_SQL \' >schema.sql.c
  5. cat schema.sql | sed 's/"/\\"/g' | sed 's/^/"/' | sed 's/$/\\n"\\/' >>schema.sql.c
  6. echo '""' >>schema.sql.c