1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Ignore case for yadm.distro and .distro_family in default template

Same as b2b0b14 but for if statements in default template processor.
This commit is contained in:
Erik Flodin
2024-12-09 22:54:41 +01:00
parent b2b0b143d6
commit 18d5f66542
3 changed files with 8 additions and 4 deletions

4
yadm
View File

@@ -363,6 +363,10 @@ BEGIN {
if (rhs == cls_array[idx]) { lhs = rhs; break }
}
}
else if (lhs == "yadm.distro" || lhs == "yadm.distro_family") {
lhs = tolower(replace_vars("{{" lhs "}}"))
rhs = tolower(rhs)
}
else {
lhs = replace_vars("{{" lhs "}}")
}