summaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorPaul Barker <paul.barker@sancloud.com>2021-09-08 14:38:01 +0300
committerTom Rini <trini@konsulko.com>2021-09-24 21:30:46 +0300
commit5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9 (patch)
treeeabe72bc1f7e2fc848616999485161ace286f71a /tools/buildman
parent15e30106ce624ade62ba87c2defe7ea67c88f1b5 (diff)
downloadu-boot-5fe50f9a4018f21d36e3ef34d7af9f7b5d7016b9.tar.xz
tools: Refactor full help printing
Collect the code for printing the full help message of patman, buildman and binman into a single function in patman.tools. Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Diffstat (limited to 'tools/buildman')
-rw-r--r--tools/buildman/control.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index a98d1b4c06..fd9664c85d 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -16,6 +16,7 @@ from patman import command
from patman import gitutil
from patman import patchstream
from patman import terminal
+from patman import tools
from patman.terminal import Print
def GetPlural(count):
@@ -133,12 +134,9 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
global builder
if options.full_help:
- pager = os.getenv('PAGER')
- if not pager:
- pager = 'more'
- fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
- 'README')
- command.Run(pager, fname)
+ tools.PrintFullHelp(
+ os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), 'README')
+ )
return 0
gitutil.Setup()