Skip to content

Commit

Permalink
_dl.sh: show error when source / signature download failed [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Apr 11, 2024
1 parent e34fffa commit 5c09843
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions _dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -563,18 +563,26 @@ live_dl() {
options+=(--output pkg.sig "${sig}")
fi
set -x
if ! my_curl "${options[@]}" && [ -n "${mirror}" ]; then
options=()
if [[ "${mirror}" = 'https://github.com/'* ]]; then
options+=(--location --proto-redir '=https')
fi
options+=(--output pkg.bin "${mirror}")
sig="${sigraw}"
if [ -n "${sig}" ]; then
[[ "${sig}" = 'https://'* ]] || sig="${mirror}${sig}"
options+=(--output pkg.sig "${sig}")
if ! my_curl "${options[@]}"; then
if [ -n "${mirror}" ]; then
options=()
if [[ "${mirror}" = 'https://github.com/'* ]]; then
options+=(--location --proto-redir '=https')
fi
options+=(--output pkg.bin "${mirror}")
sig="${sigraw}"
if [ -n "${sig}" ]; then
[[ "${sig}" = 'https://'* ]] || sig="${mirror}${sig}"
options+=(--output pkg.sig "${sig}")
fi
if ! my_curl "${options[@]}"; then
>&2 echo "! ${name}: Download: Failed (from mirror)"
exit 1
fi
else
>&2 echo "! ${name}: Download: Failed"
exit 1
fi
my_curl "${options[@]}"
fi

if [ -n "${sig}" ]; then
Expand Down

0 comments on commit 5c09843

Please sign in to comment.