mkpackage: added primary mirror (OceanScan-MST server).
This commit is contained in:
parent
c718a942c3
commit
38470c2340
@ -56,6 +56,7 @@ md5sum_tool()
|
|||||||
download()
|
download()
|
||||||
{
|
{
|
||||||
n=0; while [ -n "${url[$n]}" ]; do
|
n=0; while [ -n "${url[$n]}" ]; do
|
||||||
|
|
||||||
u="${url[$n]}"
|
u="${url[$n]}"
|
||||||
s="${md5[$n]}"
|
s="${md5[$n]}"
|
||||||
file=$(basename "$u")
|
file=$(basename "$u")
|
||||||
@ -69,10 +70,16 @@ download()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
download_tool "$u" "$cfg_dir_downloads/$file"
|
# First 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
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: download failed"
|
# On failure try upstream URL.
|
||||||
exit 1
|
download_tool "$u" "$cfg_dir_downloads/$file"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: download failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
md5="$(md5sum_tool "$cfg_dir_downloads/$file")"
|
md5="$(md5sum_tool "$cfg_dir_downloads/$file")"
|
||||||
|
Reference in New Issue
Block a user