Added -g and --git options to MMDVMHost binary

Added -g and --git options to MMDVMHost binary, which then enable this to be called by the Dashboard, etc. Since the -v --version flag is parsed already, amending that flag could cause version mismatch issues.
This commit is contained in:
George Smart 2017-03-13 17:12:15 +00:00 committed by GitHub
parent a87bf4d51c
commit e26fdd6030

View file

@ -85,8 +85,11 @@ int main(int argc, char** argv)
if ((arg == "-v") || (arg == "--version")) {
::fprintf(stdout, "MMDVMHost version %s\n", VERSION);
return 0;
} else if((arg == "-g") || (arg == "--git")) {
::fprintf(stdout, "MMDVMHost GitID #%.7s\n", gitversion);
return 0;
} else if (arg.substr(0,1) == "-") {
::fprintf(stderr, "Usage: MMDVMHost [-v|--version] [filename]\n");
::fprintf(stderr, "Usage: MMDVMHost [-v|--version] [-g|--git] [filename]\n");
return 1;
} else {
iniFile = argv[currentArg];