mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-07-07 01:10:29 +08:00
ubuntu.sh: set-mirror (ref: tuna)
This commit is contained in:
parent
a1c74f2b38
commit
df8bd9c6a2
@ -6,7 +6,8 @@ set_mirror()
|
|||||||
{
|
{
|
||||||
MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"}
|
MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"}
|
||||||
MIRROR=${MIRROR//\//\\\/}
|
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()
|
apt_install()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user