try fixing stuck after some uncorrectable mismatch

This commit is contained in:
Simon Bruder 2018-02-15 17:02:08 +00:00
parent 478838e15e
commit 82766cebed

View file

@ -178,7 +178,15 @@ echo '
# --summary-interval=0: do not show summary while downloading
# --console-log-level=error: Only show errors
# --dht-file-path=dht.dat: use generated dht data file and do not complain
aria2c --allow-overwrite --check-integrity --seed-time=0 --summary-interval=0 --console-log-level=error --dht-file-path=dht.dat $torrent
download=true
while [ $download == true ];do
aria2c --allow-overwrite --check-integrity --seed-time=0 --summary-interval=0 --console-log-level=error --dht-file-path=dht.dat $torrent
if [ $? == 0 ];then
download=false
else
rm rootfs.tar.gz rootfs.torrent
fi
done
rm dht.dat
print_done