aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoind.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-06-12 16:42:41 +0200
committerWladimir J. van der Laan <[email protected]>2014-06-12 16:42:55 +0200
commitfe1f41728755851dfc000bdb99fce91bc7f24b8d (patch)
treea7bc4c720a442bdcbc1c41fb84b13e2058cf0070 /src/bitcoind.cpp
parentRemove -beta suffix (diff)
parentqt: Unify AboutDialog and HelpMessageDialog (diff)
downloaddiscoin-fe1f41728755851dfc000bdb99fce91bc7f24b8d.tar.xz
discoin-fe1f41728755851dfc000bdb99fce91bc7f24b8d.zip
Merge pull request #4281
5c97aae qt: Unify AboutDialog and HelpMessageDialog (Wladimir J. van der Laan) 45615af Add 'about' information to `-version` output (Wladimir J. van der Laan) 97789d3 util: Add function FormatParagraph to format paragraph to fixed-width (Wladimir J. van der Laan) 96b733e Add `-version` option to get just the version (Wladimir J. van der Laan)
Diffstat (limited to 'src/bitcoind.cpp')
-rw-r--r--src/bitcoind.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 704332c39..b7d8ee7f9 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -83,19 +83,26 @@ bool AppInit(int argc, char* argv[])
return false;
}
- if (mapArgs.count("-?") || mapArgs.count("--help"))
+ if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
{
- // First part of help message is specific to bitcoind / RPC client
- std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" +
- _("Usage:") + "\n" +
- " bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" +
- _("Usage (deprecated, use bitcoin-cli):") + "\n" +
- " bitcoind [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
- " bitcoind [options] help " + _("List commands") + "\n" +
- " bitcoind [options] help <command> " + _("Get help for a command") + "\n";
-
- strUsage += "\n" + HelpMessage(HMM_BITCOIND);
- strUsage += "\n" + HelpMessageCli(false);
+ std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
+
+ if (mapArgs.count("-version"))
+ {
+ strUsage += LicenseInfo();
+ }
+ else
+ {
+ strUsage += "\n" + _("Usage:") + "\n" +
+ " bitcoind [options] " + _("Start Bitcoin Core Daemon") + "\n" +
+ _("Usage (deprecated, use bitcoin-cli):") + "\n" +
+ " bitcoind [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
+ " bitcoind [options] help " + _("List commands") + "\n" +
+ " bitcoind [options] help <command> " + _("Get help for a command") + "\n";
+
+ strUsage += "\n" + HelpMessage(HMM_BITCOIND);
+ strUsage += "\n" + HelpMessageCli(false);
+ }
fprintf(stdout, "%s", strUsage.c_str());
return false;