26 lines
624 B
Bash
26 lines
624 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
echo
|
|
echo
|
|
echo "[SCRIPT START] configure-apt-mirror"
|
|
echo
|
|
|
|
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
|
|
sudo rm /etc/apt/sources.list
|
|
|
|
echo "[SCRIPT] Write new sources"
|
|
|
|
cat <<EOF | sudo tee -a /etc/apt/sources.list
|
|
deb http://127.0.0.1/archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
|
|
deb http://127.0.0.1/archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
|
|
deb http://127.0.0.1/archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
|
|
EOF
|
|
|
|
sudo apt update
|
|
|
|
echo
|
|
echo "[SCRIPT DONE] configure-apt-mirror"
|
|
echo
|
|
echo
|