From d2421ba4f898406f3ffb75836b72c8d4196b63b6 Mon Sep 17 00:00:00 2001 From: Sude Date: Thu, 6 Feb 2014 09:27:30 +0200 Subject: [PATCH] Added --version --- main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.cpp b/main.cpp index ab10ba8..0d4a694 100644 --- a/main.cpp +++ b/main.cpp @@ -114,6 +114,7 @@ int main(int argc, char *argv[]) // Commandline options (no config file) options_cli_no_cfg.add_options() ("help,h", "Print help message") + ("version", "Print version information") ("login", bpo::value(&config.bLogin)->zero_tokens()->default_value(false), "Login") ("list", bpo::value(&config.bList)->zero_tokens()->default_value(false), "List games") ("list-details", bpo::value(&config.bListDetails)->zero_tokens()->default_value(false), "List games with detailed info") @@ -183,6 +184,12 @@ int main(int argc, char *argv[]) return 0; } + if (vm.count("version")) + { + std::cout << VERSION_STRING << std::endl; + return 0; + } + if (vm.count("chunk-size")) config.iChunkSize <<= 20; // Convert chunk size from bytes to megabytes