add -f to curl
This commit is contained in:
parent
e1ab709d09
commit
eeb905e4e0
1 changed files with 3 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ fi
|
|||
# disable curl download progress if in quiet mode
|
||||
_COPT=""
|
||||
if [[ ${FJO_QUIET} -eq 1 ]]; then
|
||||
_COPT+=" -s"
|
||||
_COPT+="-s"
|
||||
fi
|
||||
|
||||
noise "Checking forgejo..."
|
||||
|
|
@ -99,7 +99,7 @@ if [[ "${_LOCAL}" != "${_REMOTE}" ]]; then
|
|||
noise "Upgrading forgejo - installed ${_LOCAL}, latest ${_REMOTE}"
|
||||
# curl will handle a failure being able to write to output dir, etc.
|
||||
# shellcheck disable=SC2086
|
||||
curl ${_COPT} -L --output-dir "${FJO_DIR}" --remote-name-all \
|
||||
curl ${_COPT} -f -L --output-dir "${FJO_DIR}" --remote-name-all \
|
||||
"${FJO_DLB}/v${_REMOTE}/${_FJO_NAME}" \
|
||||
"${FJO_DLB}/v${_REMOTE}/${_FJO_NAME}.sha256"
|
||||
if [[ $? -eq 0 ]]; then
|
||||
|
|
@ -148,6 +148,7 @@ if [[ "${_LOCAL}" != "${_REMOTE}" ]]; then
|
|||
fi
|
||||
popd >/dev/null
|
||||
else
|
||||
# curl -f exits with 22 if HTTP response is 400+
|
||||
noise "Download of ${_FJO_NAME} and sha256 failed, not upgrading"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue