[general] new option DOWNLOAD_MIRROR to select download mirror

current DOWNLOAD_MIRROR=china is used
the mirror is provided by tsinghua university
This commit is contained in:
may 2019-05-10 04:32:01 +08:00
parent 9f6338f31a
commit be0ec27ded
2 changed files with 8 additions and 0 deletions

View File

@ -244,6 +244,11 @@ esac
DEBIAN_MIRROR='httpredir.debian.org/debian'
UBUNTU_MIRROR='ports.ubuntu.com/'
if [[ $DOWNLOAD_MIRROR == china ]] ; then
DEBIAN_MIRROR='mirrors.tuna.tsinghua.edu.cn/debian'
UBUNTU_MIRROR='mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/'
fi
# For user override
if [[ -f $SRC/userpatches/lib.config ]]; then
display_alert "Using user configuration override" "userpatches/lib.config" "info"

View File

@ -662,6 +662,9 @@ prepare_host()
# Use backup server by default to balance the load
ARMBIANSERVER=dl.armbian.com
if [[ $DOWNLOAD_MIRROR == 'china' ]]; then
ARMBIANSERVER='mirrors.tuna.tsinghua.edu.cn/armbian-releases'
fi
local toolchains=(
"https://${ARMBIANSERVER}/_toolchains/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz"