1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-01 10:56:02 +01:00

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>
This commit is contained in:
Paul Barker
2021-09-08 12:38:01 +01:00
committed by Tom Rini
parent 15e30106ce
commit 5fe50f9a40
4 changed files with 24 additions and 20 deletions

View File

@@ -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()