2 parents 5bf0d2c + 1bb446f commit bfd5282Copy full SHA for bfd5282
1 file changed
install.ps1
@@ -24,11 +24,17 @@ function Get-LatestRelease {
24
}
25
26
function Main {
27
- $os = "windows"
+ $os = "Windows"
28
$arch = Get-Arch
29
+
30
+ switch ($arch) {
31
+ "amd64" { $releaseArch = "x86_64" }
32
+ "arm64" { $releaseArch = "arm64" }
33
+ }
34
35
$version = Get-LatestRelease
36
$versionNum = $version -replace "^v", ""
- $filename = "gitx_${versionNum}_${os}_${arch}.zip"
37
+ $filename = "gitx_${os}_${releaseArch}.zip"
38
$downloadUrl = "https://github.com/$repo/releases/download/$version/$filename"
39
40
Write-Host "Downloading gitx $version for $os/$arch..."
@@ -56,4 +62,4 @@ function Main {
56
62
Write-Host "Run 'gitx.exe' to get started."
57
63
58
64
59
-Main
65
+Main
0 commit comments