23 #include <drizzled/message/catalog.pb.h>
28 int main(
int argc,
char* argv[])
30 GOOGLE_PROTOBUF_VERIFY_VERSION;
37 cerr <<
"Usage: " << argv[0] <<
" CATALOG" << endl;
46 catalog.set_name(argv[1]);
47 catalog.mutable_engine()->set_name(
"filesystem");
48 catalog.set_creation_timestamp(time(NULL));
49 catalog.set_update_timestamp(time(NULL));
50 catalog.set_uuid(
"catalog_writer");
51 catalog.set_version(1);
53 fstream output(file_name.c_str(), ios::out | ios::trunc | ios::binary);
55 if (not catalog.SerializeToOstream(&output))
57 cerr <<
"Failed to write catalog." << endl;
TODO: Rename this file - func.h is stupid.