sh.osa.cubetiqs.com/apt-mirror.sh

23 lines
1006 B
Bash
Raw Normal View History

2021-09-03 10:57:55 +07:00
#!/bin/sh -e
UBUNTU_VERSION=$(lsb_release -cs)
2021-09-03 11:02:58 +07:00
tee -a sources.list << EOF
2021-11-25 19:43:46 +07:00
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION} main restricted
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-updates main restricted
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION} universe
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-updates universe
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION} multiverse
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-updates multiverse
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-backports main restricted universe multiverse
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-security main restricted
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-security universe
deb https://mirror.ctdn.net/ubuntu ${UBUNTU_VERSION}-security multiverse
2021-09-03 11:02:58 +07:00
EOF
mv /etc/apt/sources.list /etc/apt/sources.list.bak
2021-09-03 11:11:11 +07:00
mv sources.list /etc/apt/sources.list
2021-09-03 11:12:31 +07:00
2021-09-03 11:13:10 +07:00
echo ""
echo "======================= New Sources ======================="
2021-09-03 11:11:11 +07:00
cat /etc/apt/sources.list