diff options
author | Jybz <j.biernacki+mga@free.fr> | 2020-12-02 10:00:56 +0100 |
---|---|---|
committer | Jybz <j.biernacki+mga@free.fr> | 2020-12-02 10:00:56 +0100 |
commit | 6865ccb5cd90a125aec351afd6bbbf87ddefe348 (patch) | |
tree | 31bdef34408c326125801ed629a2f6aa2d3916e2 | |
parent | a2339e4e19b427fe3e65442d1c3311604dc75166 (diff) | |
download | mageia4arm-6865ccb5cd90a125aec351afd6bbbf87ddefe348.tar mageia4arm-6865ccb5cd90a125aec351afd6bbbf87ddefe348.tar.gz mageia4arm-6865ccb5cd90a125aec351afd6bbbf87ddefe348.tar.bz2 mageia4arm-6865ccb5cd90a125aec351afd6bbbf87ddefe348.tar.xz mageia4arm-6865ccb5cd90a125aec351afd6bbbf87ddefe348.zip |
add mirror option
-rwxr-xr-x | create_arm_image.sh | 4 | ||||
-rwxr-xr-x | functions.sh | 7 | ||||
-rw-r--r-- | platforms/bananaPro/mageia4arm.cfg | 2 |
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. |