Update install.sh

This commit is contained in:
Kroese 2024-05-26 21:04:13 +02:00 committed by GitHub
parent 40d15c8b56
commit 61fbd622f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -489,15 +489,6 @@ detectLegacy() {
local dir="$1"
local find find2 desc
find=$(find "$dir" -maxdepth 1 -type d -iname win51 | head -n 1)
find2=$(find "$dir" -maxdepth 1 -type f -iname SETUPXP.HTM | head -n 1)
if [ -n "$find" ] || [ -n "$find2" ]; then
[ -d "$dir/AMD64" ] && DETECTED="winxpx64" || DETECTED="winxpx86"
desc=$(printEdition "$DETECTED" "Windows XP")
info "Detected: $desc" && return 0
fi
find=$(find "$dir" -maxdepth 1 -type d -iname win95 | head -n 1)
if [ -n "$find" ]; then
@ -522,6 +513,30 @@ detectLegacy() {
info "Detected: $desc" && return 0
fi
find=$(find "$dir" -maxdepth 1 -type d -iname win51 | head -n 1)
find2=$(find "$dir" -maxdepth 1 -type f -iname setupxp.htm | head -n 1)
if [ -n "$find" ] || [ -n "$find2" ] || [ -f "$dir/WIN51AP" ] || [ -f "$dir/WIN51IC" ]; then
[ -d "$dir/AMD64" ] && DETECTED="winxpx64" || DETECTED="winxpx86"
desc=$(printEdition "$DETECTED" "Windows XP")
info "Detected: $desc" && return 0
fi
if [ -f "$dir/CDROM_NT.5" ]; then
desc="Windows 2000"
info "Detected: $desc" && error "$desc is not supported yet!" && exit 54
fi
if [ -f "$dir/WIN51AA" ] || [ -f "$dir/WIN51AD" ] || [ -f "$dir/WIN51AS" ] || [ -f "$dir/WIN51MA" ] || [ -f "$dir/WIN51MD" ]; then
desc="Windows Server 2003"
info "Detected: $desc" && error "$desc is not supported yet!" && exit 54
fi
if [ -f "$dir/WIN51IA" ] || [ -f "$dir/WIN51IB" ] || [ -f "$dir/WIN51ID" ] || [ -f "$dir/WIN51IL" ] || [ -f "$dir/WIN51IS" ]; then
desc="Windows Server 2003"
info "Detected: $desc" && error "$desc is not supported yet!" && exit 54
fi
return 1
}