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()