23 lines
1006 B
Bash
23 lines
1006 B
Bash
#!/bin/sh -e
|
|
|
|
UBUNTU_VERSION=$(lsb_release -cs)
|
|
|
|
tee -a sources.list << EOF
|
|
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
|
|
EOF
|
|
|
|
mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
|
mv sources.list /etc/apt/sources.list
|
|
|
|
echo ""
|
|
echo "======================= New Sources ======================="
|
|
cat /etc/apt/sources.list |