mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-11-23 12:43:25 +08:00
builder: lib: subscript.py: add resolve_simple_values
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
This commit is contained in:
parent
7ad662ab28
commit
e49f667db9
@ -39,6 +39,13 @@ def dict_get(key: str, root: dict):
|
||||
return node
|
||||
|
||||
|
||||
def resolve_simple_values(original: str, values: dict) -> str:
|
||||
value = str(original)
|
||||
for key in values:
|
||||
value = value.replace(f"${key}", values[key])
|
||||
return value
|
||||
|
||||
|
||||
class SubScript:
|
||||
root: dict
|
||||
resolved: list[str]
|
||||
|
Loading…
Reference in New Issue
Block a user