2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Copyright (c) 2014 - 2016. *)
|
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2017-01-30 22:10:16 +04:00
|
|
|
let term =
|
|
|
|
let open Cmdliner.Term in
|
|
|
|
ret (const (`Help (`Pager, None)))
|
|
|
|
|
|
|
|
let description = [
|
|
|
|
`S "DESCRIPTION" ;
|
|
|
|
`P "Entry point for initializing, configuring and running a Tezos node." ;
|
|
|
|
`P Node_identity_command.Manpage.command_description ;
|
|
|
|
`P Node_run_command.Manpage.command_description ;
|
|
|
|
`P Node_config_command.Manpage.command_description ;
|
|
|
|
]
|
|
|
|
|
|
|
|
let man =
|
|
|
|
description @
|
|
|
|
Node_run_command.Manpage.examples
|
|
|
|
|
|
|
|
let info =
|
|
|
|
Cmdliner.Term.info
|
|
|
|
~doc:"The Tezos node"
|
|
|
|
~man
|
|
|
|
"tezos-node"
|
|
|
|
|
|
|
|
let commands = [
|
|
|
|
Node_run_command.cmd ;
|
|
|
|
Node_config_command.cmd ;
|
|
|
|
Node_identity_command.cmd ;
|
|
|
|
]
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
let () =
|
2017-01-30 22:10:16 +04:00
|
|
|
match Cmdliner.Term.eval_choice (term, info) commands with
|
2016-11-30 17:12:42 +04:00
|
|
|
| `Error _ -> exit 1
|
2017-01-30 22:10:16 +04:00
|
|
|
| `Help -> exit 0
|
2016-11-30 17:12:42 +04:00
|
|
|
| `Version -> exit 1
|
2017-01-30 22:10:16 +04:00
|
|
|
| `Ok () -> exit 0
|