curl: less verbose and fail on HTTP error response

-s - don't show download progress meter
-S - *do* show error messages (otherwise hidden by -s)
-f - exit with non-zero status on HTTP 400 or above responses
This commit is contained in:
Jason Rhinelander 2019-12-15 16:05:27 -04:00
parent c69237358f
commit 80fee00b5a

View File

@ -60,7 +60,7 @@ tmp=/tmp/bootstrap.tmp
# MacOS does not have wget without homebrew but does have curl # MacOS does not have wget without homebrew but does have curl
# Rick also had indicated most BSDs have curl too # Rick also had indicated most BSDs have curl too
if curl -L "$url" >"$tmp"; then if curl -fsSL "$url" >"$tmp"; then
mv "$tmp" "$dest" mv "$tmp" "$dest"
echo -e "${GREEN}lokinet successfully bootstrapped${NC}" echo -e "${GREEN}lokinet successfully bootstrapped${NC}"
else else