|
|
|
|
@ -753,9 +753,8 @@ download() {
|
|
|
|
|
elif machine_has "wget"; then
|
|
|
|
|
downloadwget "$remote_path" "$out_path" || failed=true
|
|
|
|
|
else
|
|
|
|
|
unset http_code
|
|
|
|
|
download_error_msg="Missing dependency: neither curl nor wget was found."
|
|
|
|
|
break
|
|
|
|
|
say_err "Missing dependency: neither curl nor wget was found."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then
|
|
|
|
|
@ -905,10 +904,10 @@ install_dotnet() {
|
|
|
|
|
|
|
|
|
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
|
|
|
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
|
|
|
|
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
|
|
|
|
|
|
|
|
|
# if the download fails, download the legacy_download_link
|
|
|
|
|
if [ "$download_failed" = true ]; then
|
|
|
|
|
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
|
|
|
|
case $primary_path_http_code in
|
|
|
|
|
404)
|
|
|
|
|
say "The resource at $download_link is not available."
|
|
|
|
|
@ -928,9 +927,9 @@ install_dotnet() {
|
|
|
|
|
|
|
|
|
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
|
|
|
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
|
|
|
|
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
|
|
|
|
|
|
|
|
|
if [ "$download_failed" = true ]; then
|
|
|
|
|
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
|
|
|
|
case $legacy_path_http_code in
|
|
|
|
|
404)
|
|
|
|
|
say "The resource at $download_link is not available."
|
|
|
|
|
|