mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 16:25:45 +08:00
Changed to output git ID on --version
Changed from --git to --version option for showing the GitID.
This commit is contained in:
@@ -83,13 +83,10 @@ 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;
|
|
||||||
} else if((arg == "-g") || (arg == "--git")) {
|
|
||||||
::fprintf(stdout, "MMDVMHost GitID #%.7s\n", gitversion);
|
|
||||||
return 0;
|
return 0;
|
||||||
} else if (arg.substr(0,1) == "-") {
|
} 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;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
iniFile = argv[currentArg];
|
iniFile = argv[currentArg];
|
||||||
|
|||||||
Reference in New Issue
Block a user