diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-03 16:54:40 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-10-03 16:59:28 -0400 |
commit | 7586095504f238a35937426aa870cb6d2a7b2862 (patch) | |
tree | 4cc694fe23f94365523454305e88c91ba5e0215b /src/libstore | |
parent | a562d544d8520a0f113ad1a348e28ea00f27b693 (diff) |
Remove bin2c
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/Makefile.am | 2 | ||||
-rw-r--r-- | src/libstore/local-store.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/Makefile.am b/src/libstore/Makefile.am index 335655797..cb522d6bf 100644 --- a/src/libstore/Makefile.am +++ b/src/libstore/Makefile.am @@ -29,4 +29,4 @@ AM_CXXFLAGS = -Wall \ local-store.lo: schema.sql.hh %.sql.hh: %.sql - ../bin2c/bin2c schema < $< > $@ || (rm $@ && exit 1) + sed -e 's/"/\\"/g' -e 's/.*/"\0\\n"/' < $< > $@ || (rm $@ && exit 1) diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 982644af7..251449089 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -374,7 +374,9 @@ void LocalStore::openDB(bool create) /* Initialise the database schema, if necessary. */ if (create) { + const char * schema = #include "schema.sql.hh" + ; if (sqlite3_exec(db, (const char *) schema, 0, 0, 0) != SQLITE_OK) throwSQLiteError(db, "initialising database schema"); } |