Provide a backup download location.

master
dak180 2011-03-03 14:40:14 -05:00
parent e6fd3c3c90
commit c9f97fe8d8
1 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,7 @@ OutDir="$2"
FileName="$3"
SourceDLP="$4"
MD5Sum="$5"
BackupDLP="http://wz2100.net/~dak180/BuildTools/external/"
# Make sure we are in the right place
@ -50,8 +51,10 @@ fi
if [ ! -r "${FileName}" ]; then
echo "Fetching ${SourceDLP}"
if ! curl -Lfo "${FileName}" --connect-timeout "30" "${SourceDLP}"; then
echo "error: Unable to fetch ${SourceDLP}" >&2
exit 1
if ! curl -LfOC - --connect-timeout "30" "${BackupDLP}${FileName}"; then
echo "error: Unable to fetch ${SourceDLP}" >&2
exit 1
fi
fi
else
echo "${FileName} already exists, skipping"