arg().setCmd("version", "Show the version of this program");
arg().laxParse(argc, argv);
+ if (arg().mustDo("version")) {
+ cout << "rec_control version " << VERSION << endl;
+ exit(0);
+ }
if (arg().mustDo("help") || arg().getCommands().empty()) {
cout << "syntax: rec_control [options] command, options as below: " << endl
<< endl;
exit(arg().mustDo("help") ? 0 : 99);
}
- if (arg().mustDo("version")) {
- cout << "rec_control version " << VERSION << endl;
- exit(0);
- }
-
string configname = ::arg()["config-dir"] + "/recursor.conf";
if (::arg()["config-name"] != "")
configname = ::arg()["config-dir"] + "/recursor-" + ::arg()["config-name"] + ".conf";