diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-11-11 21:50:26 +0100 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-11-11 22:19:48 +0100 |
commit | f0875b614c6fe77a70af443052cef07756e135b4 (patch) | |
tree | 81b78536c7387c268b2a4d8fcf90b22a3ce4f8fd /xmrstak | |
parent | 062287ad4740fd4ea7365f188d2a31c43b489ab5 (diff) | |
download | xmr-stak-f0875b614c6fe77a70af443052cef07756e135b4.zip xmr-stak-f0875b614c6fe77a70af443052cef07756e135b4.tar.gz |
add cli option `-v/--version`
Diffstat (limited to 'xmrstak')
-rw-r--r-- | xmrstak/cli/cli-miner.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp index 6a6191b..6e391d9 100644 --- a/xmrstak/cli/cli-miner.cpp +++ b/xmrstak/cli/cli-miner.cpp @@ -63,6 +63,7 @@ void help() cout<<"Usage: "<<params::inst().binaryName<<" [OPTION]..."<<endl; cout<<" "<<endl; cout<<" -h, --help show this help"<<endl; + cout<<" -v, --version show version number"<<endl; cout<<" -c, --config FILE common miner configuration file"<<endl; #if (!defined(CONF_NO_AEON)) && (!defined(CONF_NO_MONERO)) cout<<" --currency NAME currency to mine: monero or aeon"<<endl; @@ -296,6 +297,11 @@ int main(int argc, char *argv[]) //win_exit(); return 0; } + if(opName.compare("-v") == 0 || opName.compare("--version") == 0) + { + std::cout<< "Version: " << get_version_str() << std::endl; + return 0; + } else if(opName.compare("--noCPU") == 0) { params::inst().useCPU = false; |