Also try downloading DF from files.dfhack.org

develop
lethosor 2020-06-29 22:35:23 -04:00
parent c6283ea262
commit b4a55110e3
1 changed files with 14 additions and 2 deletions

@ -4,7 +4,6 @@ set -e
tardest="df.tar.bz2"
which md5sum && alias md5=md5sum
selfmd5=$(openssl md5 < "$0")
echo $selfmd5
@ -30,7 +29,20 @@ if [ ! -f receipt ]; then
patch=$(echo "$DF_VERSION" | cut -d. -f3)
url="http://www.bay12games.com/dwarves/df_${minor}_${patch}_linux.tar.bz2"
echo Downloading
wget "$url" -O "$tardest"
while read url; do
echo "Attempting download: ${url}"
if wget -v "$url" -O "$tardest"; then
break
fi
done <<URLS
https://www.bay12games.com/dwarves/df_${minor}_${patch}_linux.tar.bz2
https://files.dfhack.org/DF/0.${minor}.${patch}/df_${minor}_${patch}_linux.tar.bz2
URLS
echo $tardest
if ! test -f "$tardest"; then
echo "DF failed to download: $tardest not found"
exit 1
fi
fi
rm -rf df_linux