From 82766cebed5b113d0bd210a0fb8bdfc80ecc0987 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 15 Feb 2018 17:02:08 +0000 Subject: [PATCH] try fixing stuck after some uncorrectable mismatch --- imagesync.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/imagesync.sh b/imagesync.sh index 468fce0..4a893aa 100755 --- a/imagesync.sh +++ b/imagesync.sh @@ -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