2023-03-22 03:05:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
|
|
|
set -o pipefail
|
|
|
|
|
2022-07-05 02:05:16 +00:00
|
|
|
if [ -n "${DIB_DISTRIBUTION_MIRROR:-}" ]; then
|
|
|
|
# Only set the mirror for OS, everything, EPOL and update repositories,
|
|
|
|
# The others (debuginfo and source) aren't mirrored since they do not exist on all mirrors
|
|
|
|
sed -i "/\(debuginfo\|source\)/! {s#http://repo.openeuler.org#$DIB_DISTRIBUTION_MIRROR#g}" $TARGET_ROOT/etc/yum.repos.d/openEuler.repo
|
|
|
|
fi
|