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
928c5b465d
commit
5e6fa752c7
@ -3015,16 +3015,14 @@ create_lxc_container() {
|
|||||||
|
|
||||||
echo "[DEBUG] pveam available output (first 5 lines with .tar files):"
|
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/^/ /'
|
pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | head -5 | sed 's/^/ /'
|
||||||
|
|
||||||
mapfile -t ONLINE_TEMPLATES < <(
|
mapfile -t ONLINE_TEMPLATES < <(
|
||||||
pveam available -section system 2>/dev/null |
|
pveam available -section system 2>/dev/null |
|
||||||
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
||||||
awk '{print $1}' |
|
awk -F'\t' '{print $1}' |
|
||||||
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
||||||
sort -t - -k 2 -V
|
sort -t - -k 2 -V 2>/dev/null || true
|
||||||
)
|
) echo "[DEBUG] After filtering: ${#ONLINE_TEMPLATES[@]} online templates found"
|
||||||
|
|
||||||
echo "[DEBUG] After filtering: ${#ONLINE_TEMPLATES[@]} online templates found"
|
|
||||||
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
||||||
echo "[DEBUG] Online templates:"
|
echo "[DEBUG] Online templates:"
|
||||||
for tmpl in "${ONLINE_TEMPLATES[@]}"; do
|
for tmpl in "${ONLINE_TEMPLATES[@]}"; do
|
||||||
@ -3104,9 +3102,9 @@ create_lxc_container() {
|
|||||||
mapfile -t ONLINE_TEMPLATES < <(
|
mapfile -t ONLINE_TEMPLATES < <(
|
||||||
pveam available -section system 2>/dev/null |
|
pveam available -section system 2>/dev/null |
|
||||||
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' |
|
||||||
awk '{print $1}' |
|
awk -F'\t' '{print $1}' |
|
||||||
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" |
|
||||||
sort -t - -k 2 -V
|
sort -t - -k 2 -V 2>/dev/null || true
|
||||||
)
|
)
|
||||||
ONLINE_TEMPLATE=""
|
ONLINE_TEMPLATE=""
|
||||||
[[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]] && ONLINE_TEMPLATE="${ONLINE_TEMPLATES[-1]}"
|
[[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]] && ONLINE_TEMPLATE="${ONLINE_TEMPLATES[-1]}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user