mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-26 08:38:51 +01:00
Update install-powershell.ps1
This commit is contained in:
parent
6a848c8a7b
commit
965b63ea1e
@ -247,22 +247,12 @@ function Add-PathTToSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
$Name = $PSVersionTable.OS
|
$platform = (uname -i)
|
||||||
if ($Name -like "*-generic *") {
|
if ($platform -eq "x86_64") { $architecture = "x64" }
|
||||||
if ([System.Environment]::Is64BitOperatingSystem) {
|
elseif ($platform -eq "x86_32") { $architecture = "x86" }
|
||||||
$architecture = "x64"
|
elseif ($platform -eq "aarch64") { $architecture = "arm64" }
|
||||||
} else {
|
elseif ($platform -eq "aarch32") { $architecture = "arm32" }
|
||||||
$architecture = "x86"
|
else { Write-Host "Unknown platform $platform" }
|
||||||
}
|
|
||||||
} elseif ($Name -like "*-raspi *") {
|
|
||||||
if ([System.Environment]::Is64BitOperatingSystem) {
|
|
||||||
$architecture = "arm64"
|
|
||||||
} else {
|
|
||||||
$architecture = "arm32"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$architecture = "x64"
|
|
||||||
}
|
|
||||||
} elseif (-not $IsWinEnv) {
|
} elseif (-not $IsWinEnv) {
|
||||||
$architecture = "x64"
|
$architecture = "x64"
|
||||||
} elseif ($(Get-ComputerInfo -Property OsArchitecture).OsArchitecture -eq "ARM 64-bit Processor") {
|
} elseif ($(Get-ComputerInfo -Property OsArchitecture).OsArchitecture -eq "ARM 64-bit Processor") {
|
||||||
|
Loading…
Reference in New Issue
Block a user