From df8bd9c6a294750b37a225d4b0abec781498d7f1 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Sat, 5 Nov 2022 18:45:33 +0800 Subject: [PATCH] ubuntu.sh: set-mirror (ref: tuna) --- tools/ubuntu.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ubuntu.sh b/tools/ubuntu.sh index 2d75ecc..1b0d33e 100755 --- a/tools/ubuntu.sh +++ b/tools/ubuntu.sh @@ -6,7 +6,8 @@ set_mirror() { MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"} MIRROR=${MIRROR//\//\\\/} - sed -i "s/(archive|security).ubuntu.com/${MIRROR}/g" /etc/apt/sources.list + sed -i "s@http://.*archive.ubuntu.com@https://${MIRROR}@g" /etc/apt/sources.list + sed -i "s@http://.*security.ubuntu.com@https://${MIRROR}@g" /etc/apt/sources.list } apt_install()