summaryrefslogtreecommitdiff
path: root/src/util.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-04-12 12:16:47 +0100
committerdavidovski <david@davidovski.xyz>2022-04-12 12:16:47 +0100
commit6a757a93556770f227be9bdd85ce68c44d047777 (patch)
tree65aca039dd164fa6ea85e3f2cc63d3fb30b9014e /src/util.sh
parent30be8ddd88f617f21b874e623f2da8643fe2699c (diff)
added serial downloads and checking for rootv1.2.0
Diffstat (limited to 'src/util.sh')
-rw-r--r--src/util.sh6
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