From 4d9a4d4a50affc729f03c4d7a009d190a0ccbe92 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 30 Aug 2023 19:37:03 +0200 Subject: [PATCH] When present use host-system mirrorlist for more speed Signed-off-by: Knut Ahlers --- scripts/update-repo.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/update-repo.sh b/scripts/update-repo.sh index 1c625f1..2d5c865 100755 --- a/scripts/update-repo.sh +++ b/scripts/update-repo.sh @@ -32,11 +32,18 @@ step "Re-fetching Docker image" docker pull git.luzifer.io/registry/arch-repo-builder step "Building package $(basename ${REPO})" +extra_opts=() +if [[ -f /etc/pacman.d/mirrorlist ]]; then + info "Using host system mirrorlist..." + extra_opts+=(-v "/etc/pacman.d/mirrorlist:/etc/pacman.d/mirrorlist:ro") +fi + docker run --rm -ti \ -v "${TMPDIR}/src:/src" \ -v "${TMPDIR}/cfg:/config" \ -v "${REPO_DIR}:/repo" \ -v "$(pwd)/scripts/pacman.conf:/etc/pacman.conf:ro" \ + "${extra_opts[@]}" \ --ulimit nofile=262144:262144 \ git.luzifer.io/registry/arch-repo-builder \ "${REPO}"