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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user