diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-03-04 21:27:16 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-03-04 21:27:16 +0100 |
commit | 470bd2c2f2a77a01a05ef0975f6ec4b25bfaeed1 (patch) | |
tree | c8e3ce2992c956b3fb9627598c37d0f6f0777ede | |
parent | ccaee3465a559860c29419d345684394a9a16bf0 (diff) | |
download | s2i-base-httpd-470bd2c2f2a77a01a05ef0975f6ec4b25bfaeed1.tar.gz |
centos mirror
-rwxr-xr-x | etc/centos-mirror.sh | 8 |
1 files 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 |