build framework - MANAGE_ACNG, allow to specify your own mirror/URL

This commit is contained in:
tabris 2025-10-23 12:03:20 -04:00 committed by Igor
parent 94c259cf6e
commit 9d57032b89

View File

@ -53,6 +53,15 @@ function create_new_rootfs_cache_via_debootstrap() {
if [[ "${MANAGE_ACNG}" == "yes" ]]; then
local debootstrap_apt_mirror="http://localhost:3142/${APT_MIRROR}"
acng_check_status_or_restart
elif [[ "${MANAGE_ACNG}" == "no" ]]; then
: # do nothing
else
if [[ ! "${MANAGE_ACNG}" =~ ^https?:// ]]; then
exit_with_error "MANAGE_ACNG must be yes/no OR be a full URL with http/https" "${MANAGE_ACNG}"
else
# FIXME: although this works with mmdebstrap, there's a more idiomatic way with `--aptopt`
local debootstrap_apt_mirror="${MANAGE_ACNG}/${APT_MIRROR}"
fi
fi
# @TODO: one day: https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/mmdebstrap