aboutsummaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions.sh b/functions.sh
index 92c86b8..ceb848a 100755
--- a/functions.sh
+++ b/functions.sh
@@ -191,7 +191,12 @@ function addurpmimedia() {
print_info "Adding media"
if [ ! -z "${MIRROR}" ] ; then
- /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib "${MIRROR}"
+ echo ${MIRROR} | grep ${ARCH} 2>&1 1>/dev/null
+ if [ 0 -eq ${?} ]; then
+ /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib "${MIRROR}"
+ else
+ /sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib "${MIRROR}/${ARCH}"
+ fi
else
print_info "MIRROR variable not set, using mirrorlist."
/sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --ignorearch --distrib --mirrorlist "http://mirrors.mageia.org/api/mageia.${MAGEIA_VERSION}.${ARM_VERSION}.list"