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