From e26fdd60301e5b361964518da14495990a700e17 Mon Sep 17 00:00:00 2001 From: George Smart Date: Mon, 13 Mar 2017 17:12:15 +0000 Subject: [PATCH] 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. --- MMDVMHost.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/MMDVMHost.cpp b/MMDVMHost.cpp index 9985879..a8fe172 100644 --- a/MMDVMHost.cpp +++ b/MMDVMHost.cpp @@ -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];