Merge pull request #279 from m1geo/master

Added Git ID Version to the --version switch
This commit is contained in:
Jonathan Naylor 2017-03-13 19:37:02 +00:00 committed by GitHub
commit 8073ff9a30
1 changed files with 15 additions and 15 deletions

View File

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