aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcreate_arm_image.sh4
-rwxr-xr-xfunctions.sh7
-rw-r--r--platforms/bananaPro/mageia4arm.cfg2
3 files changed, 11 insertions, 2 deletions
diff --git a/create_arm_image.sh b/create_arm_image.sh
index b0d2adb..5a46a69 100755
--- a/create_arm_image.sh
+++ b/create_arm_image.sh
@@ -199,6 +199,10 @@ while true; do
fi
shift 2
;;
+ --mirror)
+ MIRROR="${2}"
+ shift 2
+ ;;
--nonfree)
NONFREE_P=1
shift
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"
diff --git a/platforms/bananaPro/mageia4arm.cfg b/platforms/bananaPro/mageia4arm.cfg
index a701573..09ceb34 100644
--- a/platforms/bananaPro/mageia4arm.cfg
+++ b/platforms/bananaPro/mageia4arm.cfg
@@ -28,7 +28,7 @@ TARGET="bananaPro"
TARGET_VERSION="1"
# URL of the Mageia mirror used to install ( see mirrors.mageia.org )
-# MIRROR="http://ftp.free.fr/mirrors/mageia.org/distrib/${MAGEIA_VERSION}/${ARM_VERSION}"
+# MIRROR=${MIRROR:="http://ftp.free.fr/mirrors/mageia.org/distrib/${MAGEIA_VERSION}/${ARM_VERSION}"}
# Default user
# If not set, no user will be defined.