aboutsummaryrefslogtreecommitdiff
path: root/docker/debian-dev/bootstrap/apt-source/11/replace-domain.bash
blob: 86e88dc7dcab633f918bdce96c82e3f03173e85e (plain)
1
2
3
4
5
6
7
#! /usr/bin/env bash

set -e

echo "Backup /etc/apt/sources.list to /etc/apt/sources.list.bak."
echo "Replace source domain in /etc/apt/sources.list to $1."
sed -i.bak "s|\(https\?://\)[-_.a-zA-Z0-9]\+/|\\1$1/|" /etc/apt/sources.list