patman: Convert camel case in tools.py

Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2022-01-29 14:14:04 -07:00
parent 82ee8bfe51
commit c1aa66e75d
50 changed files with 473 additions and 473 deletions

View file

@ -327,9 +327,9 @@ class Bintool:
"""
tmpdir = tempfile.mkdtemp(prefix='binmanf.')
print(f"- clone git repo '{git_repo}' to '{tmpdir}'")
tools.Run('git', 'clone', '--depth', '1', git_repo, tmpdir)
tools.run('git', 'clone', '--depth', '1', git_repo, tmpdir)
print(f"- build target '{make_target}'")
tools.Run('make', '-C', tmpdir, '-j', f'{multiprocessing.cpu_count()}',
tools.run('make', '-C', tmpdir, '-j', f'{multiprocessing.cpu_count()}',
make_target)
fname = os.path.join(tmpdir, bintool_path)
if not os.path.exists(fname):
@ -349,8 +349,8 @@ class Bintool:
str: Filename of fetched file to copy to a suitable directory
str: Name of temp directory to remove, or None
"""
fname, tmpdir = tools.Download(url)
tools.Run('chmod', 'a+x', fname)
fname, tmpdir = tools.download(url)
tools.run('chmod', 'a+x', fname)
return fname, tmpdir
@classmethod
@ -384,7 +384,7 @@ class Bintool:
"""
args = ['sudo', 'apt', 'install', '-y', package]
print('- %s' % ' '.join(args))
tools.Run(*args)
tools.run(*args)
return True
@staticmethod