Changed to output git ID on --version

Changed from --git to --version option for showing the GitID.
This commit is contained in:
George Smart
2017-03-13 19:17:16 +00:00
committed by GitHub
parent e26fdd6030
commit 9d71de3ae0

View File

@@ -83,13 +83,10 @@ int main(int argc, char** argv)
for (int currentArg = 1; currentArg < argc; ++currentArg) {
std::string arg = argv[currentArg];
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);
::fprintf(stdout, "MMDVMHost version %s git #%.7s\n", VERSION, gitversion);
return 0;
} else if (arg.substr(0,1) == "-") {
::fprintf(stderr, "Usage: MMDVMHost [-v|--version] [-g|--git] [filename]\n");
::fprintf(stderr, "Usage: MMDVMHost [-v|--version] [filename]\n");
return 1;
} else {
iniFile = argv[currentArg];