summaryrefslogtreecommitdiffstats
path: root/download.sh
diff options
context:
space:
mode:
Diffstat (limited to 'download.sh')
-rwxr-xr-xdownload.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/download.sh b/download.sh
index d3ac068..791819e 100755
--- a/download.sh
+++ b/download.sh
@@ -48,7 +48,8 @@ function check {
[ $fail -ne 0 ] && return $fail
size=$(du -sm "downloads/$name" | awk '{ print $1 }')
- [ $size -lt 2 ] && return 1
+ [ -z "$size" ] && return 1
+ [ "$size" -lt 2 ] && return 1
return 0
}
@@ -63,14 +64,13 @@ for name in $(cat $list); do
fail=$?
if [ $fail -ne 0 ]; then
- echo curl -L --cookie cookies.jar "$url_u/$name" -o "downloads/$name" #&> /dev/null
+ curl -L --cookie cookies.jar "$url_u/$name" -o "downloads/$name" &> /dev/null
check "$?" "$name"
fail=$?
fail_nonu=1
fi
if [ $fail -ne 0 ]; then
- exit 1;
rm -f downloads/$name
fail=0