diff options
Diffstat (limited to 'src/util.sh')
-rw-r--r-- | src/util.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util.sh b/src/util.sh index 501da96..55af05e 100644 --- a/src/util.sh +++ b/src/util.sh @@ -37,7 +37,11 @@ wait_for_download () { while [ "$downloaded" -lt "$total_download" ]; do downloaded=0 for output in $@; do - size=$(stat -t $output | cut -d" " -f2) + [ -f $output ] && { + size=$(stat -t $output | cut -d" " -f2) + } || { + size=0 + } downloaded=$((downloaded+size)) done |