blob: d55307c3443fb78a28b8bd70eaceebe435ba82e2 (
plain)
1
2
3
4
5
6
7
|
#! /usr/bin/env bash
set -e
echo "Backup /etc/apt/sources.list.d/debian.sources to /etc/apt/sources.list.d/debian.sources.bak."
echo "Replace source domain in /etc/apt/sources.list.d/debian.sources to $1."
sed -i.bak -E "s|(URIs:\\s*https?://)[-_.a-zA-Z0-9]+(/.*)|\\1$1\\2|" /etc/apt/sources.list.d/debian.sources
|