From aa7ab7dc9309931fc386201993282e9de2ff86a4 Mon Sep 17 00:00:00 2001 From: sebthom Date: Tue, 30 Apr 2024 20:29:13 +0200 Subject: [PATCH] support Ubuntu 24.04 --- .github/workflows/build.yml | 1 + fast-apt-mirror.sh | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 319d022..d370ee0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,6 +141,7 @@ jobs: - "kalilinux/kali-last-release:latest" - ubuntu:devel - ubuntu:latest + - ubuntu:24.04 - ubuntu:22.04 - ubuntu:20.04 - ubuntu:18.04 diff --git a/fast-apt-mirror.sh b/fast-apt-mirror.sh index 2c693bc..9ad3e71 100644 --- a/fast-apt-mirror.sh +++ b/fast-apt-mirror.sh @@ -140,8 +140,16 @@ function get_current_mirror() { local current_mirror_url='' local current_mirror_cfgfile case $dist_name in - debian) current_mirror_cfgfile='/etc/apt/sources.list.d/debian.sources' ;; - ubuntu|pop) current_mirror_cfgfile='/etc/apt/sources.list.d/system.sources' ;; + debian) + current_mirror_cfgfile='/etc/apt/sources.list.d/debian.sources' + ;; + ubuntu|pop) + if [[ -f /etc/apt/sources.list.d/ubuntu.sources ]]; then # Ubuntu 24+ + current_mirror_cfgfile='/etc/apt/sources.list.d/ubuntu.sources' + else + current_mirror_cfgfile='/etc/apt/sources.list.d/system.sources' + fi + ;; esac current_mirror_url=$(read_main_mirror_from_deb822_file "$current_mirror_cfgfile")