mkpackage: Use LSTS's mirror first, to download packages.

This commit is contained in:
Tiago Marques 2017-06-09 10:38:09 +01:00
parent ce7839830b
commit 78da3914b4

View File

@ -71,17 +71,22 @@ download()
fi
fi
# First try OceanScan-MST mirror.
omst_url="http://www.omst.pt/glued/$(basename $u)"
download_tool "$omst_url" "$cfg_dir_downloads/$file"
# First try LSTS mirror.
lsts_url="http://www.lsts.pt/glued/$(basename $u)"
download_tool "$lsts_url" "$cfg_dir_downloads/$file"
if [ $? -ne 0 ]; then
# On failure try upstream URL.
download_tool "$u" "$cfg_dir_downloads/$file"
# Then try OceanScan-MST mirror.
omst_url="http://www.omst.pt/glued/$(basename $u)"
download_tool "$omst_url" "$cfg_dir_downloads/$file"
if [ $? -ne 0 ]; then
echo "ERROR: download failed"
exit 1
# On failure try upstream URL.
download_tool "$u" "$cfg_dir_downloads/$file"
if [ $? -ne 0 ]; then
echo "ERROR: download failed"
exit 1
fi
fi
fi
fi
md5="$(md5sum_tool "$cfg_dir_downloads/$file")"
if [ "$s" != "$md5" ]; then