[Hide Content]diff -r 688ec9097c55 console/luxconsole.cpp
--- a/console/luxconsole.cpp Sun Feb 05 15:53:35 2012 +0100
+++ b/console/luxconsole.cpp Mon Feb 06 20:49:25 2012 -0700
@@ -119,6 +119,7 @@
("verbose,V", "Increase output verbosity (show DEBUG messages)")
("quiet,q", "Reduce output verbosity (hide INFO messages)")
("very-quiet,x", "Reduce output verbosity even more (hide WARNING messages)")
+ ("configfile,C", po::value< std::string >(), "Specify the configuration file to use")
;
// Declare a group of options that will be
@@ -160,8 +161,10 @@
store(po::command_line_parser(ac, av).
style(cmdstyle).options(cmdline_options).positional(p).run(), vm);
- std::ifstream
- ifs("luxconsole.cfg");
+ std::string configFile("luxconsole.cfg");
+ if (vm.count("configfile"))
+ configFile = vm["configfile"].as<std::string>();
+ std::ifstream ifs(configFile.c_str());
store(parse_config_file(ifs, config_file_options), vm);
notify(vm);