Update build.func
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
This commit is contained in:
parent
bd58b2cbfd
commit
ff3bd05452
@ -3016,9 +3016,15 @@ create_lxc_container() {
|
||||
echo "[DEBUG] pveam available output (first 5 lines with .tar files):"
|
||||
pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | head -5 | sed 's/^/ /'
|
||||
|
||||
mapfile -t ONLINE_TEMPLATES \
|
||||
\
|
||||
echo "[DEBUG] After filtering: ${#ONLINE_TEMPLATES[@]} online templates found" < <(pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | awk -F'\t' '{print $1}' | grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" | sort -t - -k 2 -V 2>/dev/null || true)
|
||||
mapfile -t ONLINE_TEMPLATES < <(
|
||||
pveam available -section system 2>/dev/null |
|
||||
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
||||
awk '{print $NF}' |
|
||||
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
||||
sort -V 2>/dev/null
|
||||
)
|
||||
|
||||
echo "[DEBUG] After filtering: ${#ONLINE_TEMPLATES[@]} online templates found"
|
||||
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
||||
echo "[DEBUG] Online templates:"
|
||||
for tmpl in "${ONLINE_TEMPLATES[@]}"; do
|
||||
@ -3081,9 +3087,9 @@ create_lxc_container() {
|
||||
mapfile -t ONLINE_TEMPLATES < <(
|
||||
pveam available -section system 2>/dev/null |
|
||||
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
||||
awk -F'\t' '{print $1}' |
|
||||
awk '{print $NF}' |
|
||||
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
||||
sort -t - -k 2 -V 2>/dev/null || true
|
||||
sort -V 2>/dev/null
|
||||
)
|
||||
|
||||
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
||||
@ -3157,9 +3163,9 @@ create_lxc_container() {
|
||||
mapfile -t ONLINE_TEMPLATES < <(
|
||||
pveam available -section system 2>/dev/null |
|
||||
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
||||
awk -F'\t' '{print $1}' |
|
||||
awk '{print $NF}' |
|
||||
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
||||
sort -t - -k 2 -V 2>/dev/null || true
|
||||
sort -V 2>/dev/null
|
||||
)
|
||||
ONLINE_TEMPLATE=""
|
||||
[[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]] && ONLINE_TEMPLATE="${ONLINE_TEMPLATES[-1]}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user