mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
doc: Add manual page generation for bitcoin-util
- Add `-version` option to `bitcoin-util` - Add `bitcoin-util` call to `gen-manpages.sh` - Add stub manual page `bitcoin-util.1` - Add install of `bitcoin-util.1` to build system
This commit is contained in:
@@ -40,6 +40,8 @@ static void SetupBitcoinUtilArgs(ArgsManager &argsman)
|
||||
{
|
||||
SetupHelpOptions(argsman);
|
||||
|
||||
argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
|
||||
SetupChainParamsBaseOptions(argsman);
|
||||
}
|
||||
|
||||
@@ -62,12 +64,14 @@ static int AppInitUtil(int argc, char* argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (argc < 2 || HelpRequested(gArgs)) {
|
||||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
|
||||
// First part of help message is specific to this utility
|
||||
std::string strUsage = PACKAGE_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n\n" +
|
||||
"Usage: bitcoin-util [options] [commands] Do stuff\n" +
|
||||
"\n";
|
||||
strUsage += gArgs.GetHelpMessage();
|
||||
std::string strUsage = PACKAGE_NAME " bitcoin-util utility version " + FormatFullVersion() + "\n";
|
||||
if (!gArgs.IsArgSet("-version")) {
|
||||
strUsage += "\n"
|
||||
"Usage: bitcoin-util [options] [commands] Do stuff\n";
|
||||
strUsage += "\n" + gArgs.GetHelpMessage();
|
||||
}
|
||||
|
||||
tfm::format(std::cout, "%s", strUsage);
|
||||
|
||||
|
Reference in New Issue
Block a user