Update install.sh

This commit is contained in:
Kroese 2024-05-01 19:48:32 +02:00 committed by GitHub
parent 72e8bdf62e
commit b93104c341
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -275,7 +275,8 @@ doMido() {
verifyFile() { verifyFile() {
local iso="$1" local iso="$1"
local version="$2" local version="$2"
local hash check local hash=""
local check=""
info "Calculating SHA256 checksum of the ISO file..." info "Calculating SHA256 checksum of the ISO file..."
@ -302,7 +303,7 @@ downloadFile() {
local url="$2" local url="$2"
local desc="$3" local desc="$3"
local version="$4" local version="$4"
local rc progress domain local rc progress domain dots
rm -f "$iso" rm -f "$iso"
@ -316,8 +317,12 @@ downloadFile() {
local msg="Downloading $desc..." local msg="Downloading $desc..."
domain=$(echo "$url" | awk -F/ '{print $3}') domain=$(echo "$url" | awk -F/ '{print $3}')
domain=$(expr "$domain" : '.*\.\(.*\..*\)') dots=$(echo $domain | grep -o "." | wc -l)
[[ "${domain,,}" != *"microsoft.com" ]] && msg="Downloading $desc from $domain..." (( dots > 1 )) && domain=$(expr "$domain" : '.*\.\(.*\..*\)')
if [ -n "$domain" ] && [[ "${domain,,}" != *"microsoft.com" ]];
msg="Downloading $desc from $domain..."
fi
info "$msg" && html "$msg" info "$msg" && html "$msg"
/run/progress.sh "$iso" "Downloading $desc ([P])..." & /run/progress.sh "$iso" "Downloading $desc ([P])..." &