Add feature to resume downloads of params files.
This commit is contained in:
parent
7f689b0a42
commit
c25c1d95cd
|
@ -18,6 +18,8 @@ TESTNET3_DIR="$PARAMS_DIR/testnet3"
|
||||||
function fetch_params {
|
function fetch_params {
|
||||||
local url="$1"
|
local url="$1"
|
||||||
local filename="$(echo "$url" | sed 's,^.*/,,')"
|
local filename="$(echo "$url" | sed 's,^.*/,,')"
|
||||||
|
local dlname="${filename}.dl"
|
||||||
|
|
||||||
if ! [ -f "$filename" ]
|
if ! [ -f "$filename" ]
|
||||||
then
|
then
|
||||||
echo "Retrieving: $url"
|
echo "Retrieving: $url"
|
||||||
|
@ -28,7 +30,12 @@ function fetch_params {
|
||||||
wget \
|
wget \
|
||||||
--progress=dot:giga \
|
--progress=dot:giga \
|
||||||
--no-check-certificate \
|
--no-check-certificate \
|
||||||
|
--output-document="$dlname" \
|
||||||
|
--continue \
|
||||||
"$url"
|
"$url"
|
||||||
|
|
||||||
|
# Only after successful download do we update the parameter load path:
|
||||||
|
mv -v "$dlname" "$filename"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue