add -f to curl

This commit is contained in:
tengel 2024-07-31 10:41:31 -05:00
parent e1ab709d09
commit eeb905e4e0

View file

@ -99,7 +99,7 @@ if [[ "${_LOCAL}" != "${_REMOTE}" ]]; then
noise "Upgrading forgejo - installed ${_LOCAL}, latest ${_REMOTE}" noise "Upgrading forgejo - installed ${_LOCAL}, latest ${_REMOTE}"
# curl will handle a failure being able to write to output dir, etc. # curl will handle a failure being able to write to output dir, etc.
# shellcheck disable=SC2086 # 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}" \
"${FJO_DLB}/v${_REMOTE}/${_FJO_NAME}.sha256" "${FJO_DLB}/v${_REMOTE}/${_FJO_NAME}.sha256"
if [[ $? -eq 0 ]]; then if [[ $? -eq 0 ]]; then
@ -148,6 +148,7 @@ if [[ "${_LOCAL}" != "${_REMOTE}" ]]; then
fi fi
popd >/dev/null popd >/dev/null
else else
# curl -f exits with 22 if HTTP response is 400+
noise "Download of ${_FJO_NAME} and sha256 failed, not upgrading" noise "Download of ${_FJO_NAME} and sha256 failed, not upgrading"
exit 1 exit 1
fi fi