summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-03-04 21:27:16 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-03-04 21:27:16 +0100
commit470bd2c2f2a77a01a05ef0975f6ec4b25bfaeed1 (patch)
treec8e3ce2992c956b3fb9627598c37d0f6f0777ede
parentccaee3465a559860c29419d345684394a9a16bf0 (diff)
downloads2i-base-httpd-470bd2c2f2a77a01a05ef0975f6ec4b25bfaeed1.tar.gz
centos mirror
-rwxr-xr-xetc/centos-mirror.sh8
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