From b93104c3416abcbf8b5903d98a39a64fb7346ce7 Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 1 May 2024 19:48:32 +0200 Subject: [PATCH] Update install.sh --- src/install.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/install.sh b/src/install.sh index 32c486d..66aff7e 100644 --- a/src/install.sh +++ b/src/install.sh @@ -275,7 +275,8 @@ doMido() { verifyFile() { local iso="$1" local version="$2" - local hash check + local hash="" + local check="" info "Calculating SHA256 checksum of the ISO file..." @@ -302,7 +303,7 @@ downloadFile() { local url="$2" local desc="$3" local version="$4" - local rc progress domain + local rc progress domain dots rm -f "$iso" @@ -316,8 +317,12 @@ downloadFile() { local msg="Downloading $desc..." domain=$(echo "$url" | awk -F/ '{print $3}') - domain=$(expr "$domain" : '.*\.\(.*\..*\)') - [[ "${domain,,}" != *"microsoft.com" ]] && msg="Downloading $desc from $domain..." + dots=$(echo $domain | grep -o "." | wc -l) + (( dots > 1 )) && domain=$(expr "$domain" : '.*\.\(.*\..*\)') + + if [ -n "$domain" ] && [[ "${domain,,}" != *"microsoft.com" ]]; + msg="Downloading $desc from $domain..." + fi info "$msg" && html "$msg" /run/progress.sh "$iso" "Downloading $desc ([P])..." &