mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-10 01:17:44 +03:00
ukify: Allow passing multiple directories to --tools
This commit is contained in:
parent
9c29d87bee
commit
22ad038ac6
@ -221,11 +221,11 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--tools=<replaceable>DIR</replaceable></option></term>
|
||||
<term><option>--tools=<replaceable>DIRS</replaceable></option></term>
|
||||
|
||||
<listitem><para>Specify a directory with helper tools. <command>ukify</command> will look for helper
|
||||
tools in that directory first, and if not found, try to load them from <varname>$PATH</varname> in
|
||||
the usual fashion.</para></listitem>
|
||||
<listitem><para>Specify one or more directories with helper tools. <command>ukify</command> will look
|
||||
for helper tools in those directories first, and if not found, try to load them from
|
||||
<varname>$PATH</varname> in the usual fashion.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
|
@ -321,9 +321,10 @@ def check_inputs(opts):
|
||||
|
||||
def find_tool(name, fallback=None, opts=None):
|
||||
if opts and opts.tools:
|
||||
tool = opts.tools / name
|
||||
if tool.exists():
|
||||
return tool
|
||||
for d in opts.tools:
|
||||
tool = d / name
|
||||
if tool.exists():
|
||||
return tool
|
||||
|
||||
return fallback or name
|
||||
|
||||
@ -656,7 +657,8 @@ usage: ukify [options…] linux initrd…
|
||||
|
||||
p.add_argument('--tools',
|
||||
type=pathlib.Path,
|
||||
help='a directory with systemd-measure and other tools')
|
||||
nargs='+',
|
||||
help='Directories to search for tools (systemd-measure, llvm-objcopy, ...)')
|
||||
|
||||
p.add_argument('--output', '-o',
|
||||
type=pathlib.Path,
|
||||
|
Loading…
Reference in New Issue
Block a user