summaryrefslogtreecommitdiff
path: root/tests/dist-upgrades.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dist-upgrades.sh')
-rwxr-xr-xtests/dist-upgrades.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/dist-upgrades.sh b/tests/dist-upgrades.sh
index b90f17b..dec3dad 100755
--- a/tests/dist-upgrades.sh
+++ b/tests/dist-upgrades.sh
@@ -23,7 +23,11 @@ set -ex
export DEBIAN_FRONTEND=noninteractive
-sed -i "s/\([^ ]*\) \([^ ]*\) [^ ]* \(.*\)/\1 \2 $1 \3/" /etc/apt/sources.list
+case "$1" in
+ jessie|stretch) MIRROR="http://archive.debian.org/debian" ;;
+ *) MIRROR="http://deb.debian.org/debian" ;;
+esac
+echo "deb $MIRROR $1 main" > /etc/apt/sources.list
apt update
apt dist-upgrade -y
@@ -37,7 +41,7 @@ EOF
chmod +x upgrade
ssh-keygen -f "$SSH_KEYPATH" -N ''
-debvm-create --sshkey="$SSH_KEYPATH.pub" -r jessie --size=3G -- --customize-hook="copy-in upgrade /usr/local/bin"
+debvm-create --sshkey="$SSH_KEYPATH.pub" -r jessie --size=3G -- --customize-hook="copy-in upgrade /usr/local/bin" http://archive.debian.org/debian
SSH_PORT=2222
for RELEASE in stretch buster bullseye bookworm sid; do