Commit 3c0e7165 authored by Vitaly Lipatov's avatar Vitaly Lipatov

web: skip download if exists

parent 456d4453
...@@ -13,6 +13,10 @@ download_url() ...@@ -13,6 +13,10 @@ download_url()
{ {
# use wget with try=1 and timeout = 30 sec # use wget with try=1 and timeout = 30 sec
which wget >/dev/null || fatal "Can't download, wget command is missed" which wget >/dev/null || fatal "Can't download, wget command is missed"
# do not download if already exists...
[ -r "$(basename "$1")" ] && { echo "skipping $1, already exists..."; return; }
# NOTE: disable cert checking # NOTE: disable cert checking
a= wget --no-check-certificate -c -t 1 -T 30 "$1" a= wget --no-check-certificate -c -t 1 -T 30 "$1"
local RET=$? local RET=$?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment