summaryrefslogtreecommitdiffstats
path: root/download.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2022-06-26 01:59:38 +0400
committerSuren A. Chilingaryan <csa@suren.me>2022-06-26 01:59:38 +0400
commit0f437199b65025a903d568be87747cf5eb4b9805 (patch)
tree72f05f8ce69af6348e5c2521632f5ada5781f3ba /download.sh
parent90d1bf5893a9a373eccd40693f801aa74c3ad36b (diff)
downloadopenmtbmap-master.tar.gz
openmtbmap-master.tar.bz2
openmtbmap-master.tar.xz
openmtbmap-master.zip
Support for *linux.7z archivesHEADmaster
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