mkpackage: change order of servers, LSTS -> upstream URL -> OMST.

This commit is contained in:
Pedro Gonçalves 2020-07-31 12:47:57 +01:00
parent 1f26d350a9
commit 3251a10ec5

View File

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