File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ pveam update >/dev/null
177177msg_ok " Updated LXC template list"
178178
179179# Build TurnKey selection menu dynamically from available templates
180+ # Requires gawk for regex capture groups in match()
181+ command -v gawk & > /dev/null || apt-get install -y gawk & > /dev/null
180182declare -A TURNKEY_TEMPLATES
181183TURNKEY_MENU=()
182184MSG_MAX_LENGTH=0
@@ -185,7 +187,7 @@ while IFS=$'\t' read -r TEMPLATE_FILE TAG ITEM; do
185187 OFFSET=2
186188 (( ${# ITEM} + OFFSET > MSG_MAX_LENGTH)) && MSG_MAX_LENGTH=$(( ${# ITEM} + OFFSET))
187189 TURNKEY_MENU+=(" $TAG " " $ITEM " " OFF" )
188- done < <( pveam available -section turnkeylinux | awk ' {
190+ done < <( pveam available -section turnkeylinux | gawk ' {
189191 tpl = $2
190192 if (match(tpl, /debian-([0-9]+)-turnkey-([^_]+)_([^_]+)_/, m)) {
191193 app = m[2]; deb = m[1]; ver = m[3]
You can’t perform that action at this time.
0 commit comments