diff --git a/install.ps1 b/install.ps1 index 20c6d6c..f1f9144 100644 --- a/install.ps1 +++ b/install.ps1 @@ -24,11 +24,17 @@ function Get-LatestRelease { } function Main { - $os = "windows" + $os = "Windows" $arch = Get-Arch + + switch ($arch) { + "amd64" { $releaseArch = "x86_64" } + "arm64" { $releaseArch = "arm64" } + } + $version = Get-LatestRelease $versionNum = $version -replace "^v", "" - $filename = "gitx_${versionNum}_${os}_${arch}.zip" + $filename = "gitx_${os}_${releaseArch}.zip" $downloadUrl = "https://github.com/$repo/releases/download/$version/$filename" Write-Host "Downloading gitx $version for $os/$arch..." @@ -56,4 +62,4 @@ function Main { Write-Host "Run 'gitx.exe' to get started." } -Main \ No newline at end of file +Main