Update Linux installer

This commit is contained in:
Vladimir Safonkin 2021-02-11 10:32:14 +03:00
parent ce38f90a9a
commit 3c80e97cbd

View File

@ -753,9 +753,8 @@ download() {
elif machine_has "wget"; then elif machine_has "wget"; then
downloadwget "$remote_path" "$out_path" || failed=true downloadwget "$remote_path" "$out_path" || failed=true
else else
unset http_code say_err "Missing dependency: neither curl nor wget was found."
download_error_msg="Missing dependency: neither curl nor wget was found." exit 1
break
fi fi
if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then 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. # 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 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 the download fails, download the legacy_download_link
if [ "$download_failed" = true ]; then 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 case $primary_path_http_code in
404) 404)
say "The resource at $download_link is not available." 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. # 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 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 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 case $legacy_path_http_code in
404) 404)
say "The resource at $download_link is not available." say "The resource at $download_link is not available."