Skip to content

Commit 9d57032

Browse files
tabrisnetigorpecovnik
authored andcommitted
build framework - MANAGE_ACNG, allow to specify your own mirror/URL
1 parent 94c259c commit 9d57032

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/functions/rootfs/rootfs-create.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ function create_new_rootfs_cache_via_debootstrap() {
5353
if [[ "${MANAGE_ACNG}" == "yes" ]]; then
5454
local debootstrap_apt_mirror="http://localhost:3142/${APT_MIRROR}"
5555
acng_check_status_or_restart
56+
elif [[ "${MANAGE_ACNG}" == "no" ]]; then
57+
: # do nothing
58+
else
59+
if [[ ! "${MANAGE_ACNG}" =~ ^https?:// ]]; then
60+
exit_with_error "MANAGE_ACNG must be yes/no OR be a full URL with http/https" "${MANAGE_ACNG}"
61+
else
62+
# FIXME: although this works with mmdebstrap, there's a more idiomatic way with `--aptopt`
63+
local debootstrap_apt_mirror="${MANAGE_ACNG}/${APT_MIRROR}"
64+
fi
5665
fi
5766

5867
# @TODO: one day: https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/mmdebstrap

0 commit comments

Comments
 (0)