Change-Id: Ia826901dbbc1a3fd6f5df4af22418015b9dbc78c
Signed-off-by: Tim Johnson <tijohnson@linuxfoundation.org>
apt install wget -y
wget http://ftp.au.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-26_amd64.deb
dpkg -i netselect_0.3.ds1-26_amd64.deb
- set +e # DO NOT cause build failure if any mirrors are not reachable.
- netselect -s 20 -t 40 "$(wget -qO - mirrors.ubuntu.com/mirrors.txt)"
- set -e
- sed -i 's/http:\/\/us.archive.ubuntu.com\/ubuntu\//http:\/\/ubuntu.uberglobalmirror.com\/archive\//' /etc/apt/sources.list
+ if ! netselect -s 20 -t 40 "$(wget -qO - mirrors.ubuntu.com/mirrors.txt)"; then
+ echo "NOTE: Unable to refresh 'sources.list'"
+ fi
+ sed -i 's#http://us.archive.ubuntu.com/ubuntu#http://ubuntu.uberglobalmirror.com/archive#' \
+ /etc/apt/sources.list
echo "Installing python-minimal..."
apt clean all -y