Closed HCRitter closed 1 year ago
I have seen there are multiple other instances of the if checks for the architecture. in other functions in that file like:
if ($title -match "ia32") {
$arch = "IA32"
}
if ($title -match "ia64") {
$arch = "IA64"
}
if ($title -match "64-Bit" -and $title -notmatch "32-Bit" -and -not $arch) {
$arch = "x64"
}
if ($title -notmatch "64-Bit" -and $title -match "32-Bit" -and -not $arch) {
$arch = "x86"
}
if ($title -match "x64" -or $title -match "AMD64") {
$arch = "x64"
}
if ($title -match "x86") {
$arch = "x86"
}
if ($title -match "ARM64") {
$arch = "ARM64"
}
if ($title -match "ARM-based") {
$arch = "ARM32"
}
#...
If you like I can change them as well.
awesome! thank you. i havent had time in forever to work on this project and need to set aside some maintenance. this is a great change but may take some time to get done
yes, please do change. i prefer pretty and dont know regex 🚀
@potatoqualitee now it should be nice and clean :D
@potatoqualitee anything else to change? Should be good to go now :)
Refactored code to improve architecture determination:
Hey Chrissy, I hope you are fine with my improvements. To test them you can check this code:
If you like I could check for other improvements as well :)