mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 11:13:23 -03:00
[scripts] previous_release: improve failed download error message
before: ------------------------------------------------------------ $ contrib/devtools/previous_release.sh -r -b v0.9.5 [...] gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now ------------------------------------------------------------ now: ------------------------------------------------------------ $ contrib/devtools/previous_release.sh -r -b v0.9.5 [...] curl: (22) The requested URL returned error: 404 Not Found Download failed. ------------------------------------------------------------
This commit is contained in:
parent
5236b2e267
commit
332f373a9d
1 changed files with 4 additions and 1 deletions
|
@ -139,7 +139,10 @@ pushd "$TARGET" || exit 1
|
||||||
fi
|
fi
|
||||||
URL="https://bitcoin.org/$BIN_PATH/bitcoin-${tag:1}-$PLATFORM.tar.gz"
|
URL="https://bitcoin.org/$BIN_PATH/bitcoin-${tag:1}-$PLATFORM.tar.gz"
|
||||||
echo "Fetching: $URL"
|
echo "Fetching: $URL"
|
||||||
curl -O $URL
|
if ! curl -O -f $URL; then
|
||||||
|
echo "Download failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
tar -zxf "bitcoin-${tag:1}-$PLATFORM.tar.gz" -C "$tag" --strip-components=1 "bitcoin-${tag:1}"
|
tar -zxf "bitcoin-${tag:1}-$PLATFORM.tar.gz" -C "$tag" --strip-components=1 "bitcoin-${tag:1}"
|
||||||
rm "bitcoin-${tag:1}-$PLATFORM.tar.gz"
|
rm "bitcoin-${tag:1}-$PLATFORM.tar.gz"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue