mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
Output license info when binaries are passed -version
Consolidate to outputting the licensing info when we pass -version to a binary, i.e bitcoind -version: ```bash itcoin Core version v22.99.0-fc1f355913f6-dirty Copyright (C) 2009-2022 The Bitcoin Core developers Please contribute if you find Bitcoin Core useful. Visit <https://bitcoincore.org/> for further information about the software. The source code is available from <https://github.com/bitcoin/bitcoin>. This is experimental software. Distributed under the MIT software license, see the accompanying file COPYING or <https://opensource.org/licenses/MIT> ```
This commit is contained in:
parent
4c3e3c5746
commit
2618fb8d15
5 changed files with 20 additions and 7 deletions
|
@ -133,7 +133,10 @@ static int AppInitRPC(int argc, char* argv[])
|
|||
}
|
||||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
|
||||
std::string strUsage = PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n";
|
||||
if (!gArgs.IsArgSet("-version")) {
|
||||
|
||||
if (gArgs.IsArgSet("-version")) {
|
||||
strUsage += FormatParagraph(LicenseInfo());
|
||||
} else {
|
||||
strUsage += "\n"
|
||||
"Usage: bitcoin-cli [options] <command> [params] Send command to " PACKAGE_NAME "\n"
|
||||
"or: bitcoin-cli [options] -named <command> [name=value]... Send command to " PACKAGE_NAME " (with named arguments)\n"
|
||||
|
|
|
@ -102,7 +102,10 @@ static int AppInitRawTx(int argc, char* argv[])
|
|||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
|
||||
// First part of help message is specific to this utility
|
||||
std::string strUsage = PACKAGE_NAME " bitcoin-tx utility version " + FormatFullVersion() + "\n";
|
||||
if (!gArgs.IsArgSet("-version")) {
|
||||
|
||||
if (gArgs.IsArgSet("-version")) {
|
||||
strUsage += FormatParagraph(LicenseInfo());
|
||||
} else {
|
||||
strUsage += "\n"
|
||||
"Usage: bitcoin-tx [options] <hex-tx> [commands] Update hex-encoded bitcoin transaction\n"
|
||||
"or: bitcoin-tx [options] -create [commands] Create hex-encoded bitcoin transaction\n"
|
||||
|
|
|
@ -53,7 +53,10 @@ static int AppInitUtil(ArgsManager& args, int argc, char* argv[])
|
|||
if (HelpRequested(args) || args.IsArgSet("-version")) {
|
||||
// First part of help message is specific to this utility
|
||||
std::string strUsage = PACKAGE_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n";
|
||||
if (!args.IsArgSet("-version")) {
|
||||
|
||||
if (args.IsArgSet("-version")) {
|
||||
strUsage += FormatParagraph(LicenseInfo());
|
||||
} else {
|
||||
strUsage += "\n"
|
||||
"Usage: bitcoin-util [options] [commands] Do stuff\n";
|
||||
strUsage += "\n" + args.GetHelpMessage();
|
||||
|
|
|
@ -59,7 +59,10 @@ static bool WalletAppInit(ArgsManager& args, int argc, char* argv[])
|
|||
}
|
||||
if (argc < 2 || HelpRequested(args) || args.IsArgSet("-version")) {
|
||||
std::string strUsage = strprintf("%s bitcoin-wallet version", PACKAGE_NAME) + " " + FormatFullVersion() + "\n";
|
||||
if (!args.IsArgSet("-version")) {
|
||||
|
||||
if (args.IsArgSet("-version")) {
|
||||
strUsage += FormatParagraph(LicenseInfo());
|
||||
} else {
|
||||
strUsage += "\n"
|
||||
"bitcoin-wallet is an offline tool for creating and interacting with " PACKAGE_NAME " wallet files.\n"
|
||||
"By default bitcoin-wallet will act on wallets in the default mainnet wallet directory in the datadir.\n"
|
||||
|
|
|
@ -126,9 +126,10 @@ static bool AppInit(NodeContext& node, int argc, char* argv[])
|
|||
if (HelpRequested(args) || args.IsArgSet("-version")) {
|
||||
std::string strUsage = PACKAGE_NAME " version " + FormatFullVersion() + "\n";
|
||||
|
||||
if (!args.IsArgSet("-version")) {
|
||||
strUsage += FormatParagraph(LicenseInfo()) + "\n"
|
||||
"\nUsage: bitcoind [options] Start " PACKAGE_NAME "\n"
|
||||
if (args.IsArgSet("-version")) {
|
||||
strUsage += FormatParagraph(LicenseInfo());
|
||||
} else {
|
||||
strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME "\n"
|
||||
"\n";
|
||||
strUsage += args.GetHelpMessage();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue