Update build.func
This commit is contained in:
parent
60ddf3af72
commit
a6cdb474a1
@ -3002,12 +3002,6 @@ create_lxc_container() {
|
|||||||
mapfile -t ONLINE_TEMPLATES < <(pveam available -section system 2>/dev/null | grep -E '\.(tar\.zst|tar\.xz|tar\.gz)$' | awk '{print $2}' | 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 $2}' | grep -E "${SEARCH_PATTERN}.*${TEMPLATE_PATTERN}" | 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"
|
||||||
set -u
|
set -u
|
||||||
if [[ ${#ONLINE_TEMPLATES[@]} -gt 0 ]]; then
|
|
||||||
#echo "[DEBUG] Online templates:"
|
|
||||||
for tmpl in "${ONLINE_TEMPLATES[@]}"; do
|
|
||||||
echo " - $tmpl"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
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