From f44c2aac8c83b91926bc9e086d12ed8afc35b617 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 6 Sep 2023 11:43:11 -0700 Subject: [PATCH] merge redundant cases for seed/mirror handling --- debian/changelog | 1 + live-build/auto/config | 16 ++++++---------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index 11ae1996..12663971 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ livecd-rootfs (23.10.33) UNRELEASED; urgency=medium * Drop references to ubuntu-netbook, obsolete since Ubuntu 11.04. * ubuntu-unity-live task exists, use it also instead of hard-coded list of packages. + * live-build/auto/config: various refactors to eliminate code duplication -- Steve Langasek Wed, 06 Sep 2023 11:23:17 -0700 diff --git a/live-build/auto/config b/live-build/auto/config index 5b68d397..23caa46a 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -15,16 +15,12 @@ echo "Building on $(hostname --fqdn)" SEEDMIRROR=https://ubuntu-archive-team.ubuntu.com/seeds/ if [ -z "$MIRROR" ]; then case $(hostname --fqdn) in - *.ubuntu.com) MIRROR=http://ftpmaster.internal/ubuntu/ - SEEDMIRROR=http://archive-team.internal/seeds/ - ;; - *.buildd) MIRROR=http://ftpmaster.internal/ubuntu/ - SEEDMIRROR=http://archive-team.internal/seeds/ - ;; - *.ppa|*.scalingstack) MIRROR=http://ftpmaster.internal/ubuntu/ - SEEDMIRROR=http://archive-team.internal/seeds/ - ;; - *) case $ARCH in + *.ubuntu.com|*.buildd|*.ppa|*.scalingstack) + MIRROR=http://ftpmaster.internal/ubuntu/ + SEEDMIRROR=http://archive-team.internal/seeds/ + ;; + *) + case $ARCH in i386|amd64) MIRROR=http://archive.ubuntu.com/ubuntu/ ;; *) MIRROR=http://ports.ubuntu.com/ubuntu-ports/ ;; esac