432 |
#if HAVE_SQLITE3 |
#if HAVE_SQLITE3 |
433 |
try { |
try { |
434 |
std::cout << "Creating instruments database..." << std::endl; |
std::cout << "Creating instruments database..." << std::endl; |
435 |
if (optarg) |
if (optarg) // with glibc this only fires with form --create-instruments-db=bla (see below) |
436 |
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(String(optarg)); |
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(String(optarg)); |
437 |
|
else if (argv[optind] && argv[optind][0] != '-') // workaround: glibc actually expects form --foo=value for all optional arguments ... |
438 |
|
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(String(argv[optind++])); |
439 |
else |
else |
440 |
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(); // use default instruments db location |
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(); // use default instruments db location |
441 |
std::cout << "Done" << std::endl; |
std::cout << "Done" << std::endl; |