From 470bd2c2f2a77a01a05ef0975f6ec4b25bfaeed1 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 4 Mar 2020 21:27:16 +0100 Subject: centos mirror --- etc/centos-mirror.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/centos-mirror.sh b/etc/centos-mirror.sh index e8eb6a7..55961ce 100755 --- a/etc/centos-mirror.sh +++ b/etc/centos-mirror.sh @@ -1,7 +1,11 @@ #!/bin/sh +furl="http://mirror.centos.org/" +turl="${CENTOS_MIRROR-http://mirror.centos.org/}" for file in /etc/yum.repos.d/CentOS*.repo; do - sed -i .orig \ + sed -i.orig \ -e 's/^mirrorlist/#mirrorlist/' \ -e 's/^#baseurl/baseurl/' \ - $file + -e "s|${furl}|${turl}|" \ + "$file" + diff -u "${file}.orig" "${file}" done -- cgit