-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
executable file
·20 lines (20 loc) · 1.07 KB
/
install.ps1
File metadata and controls
executable file
·20 lines (20 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# eximagent installer (Windows) — pins v0.1.77.
$ErrorActionPreference = 'Stop'
if (-not [System.Environment]::Is64BitOperatingSystem) { throw 'eximagent: 64-bit Windows required' }
$dir = if ($env:EXIMAGENT_INSTALL_DIR) { $env:EXIMAGENT_INSTALL_DIR } else { Join-Path $env:USERPROFILE '.eximagent\bin' }
New-Item -ItemType Directory -Force -Path $dir | Out-Null
$bin = Join-Path $dir 'eximagent.exe'
$tmp = "$bin.download"
$url = 'https://github.com/EximAgent/cli/releases/download/v0.1.77/eximagent-windows-amd64.exe'
Write-Host "[eximagent] downloading v0.1.77 for windows-amd64..."
Invoke-WebRequest -Uri $url -OutFile $tmp -UseBasicParsing
Move-Item -Force -Path $tmp -Destination $bin
$env:EXIMAGENT_INSTALL_DIR = $dir
$env:EXIMAGENT_EXPECTED_TAG = 'v0.1.77'
$env:EXIMAGENT_BACKEND = 'https://cli.eximagent.ai'
& $bin install
if (Get-Command eximagent -ErrorAction SilentlyContinue) {
Write-Host "[eximagent] ready on PATH: $((Get-Command eximagent).Source)"
} else {
Write-Host "[eximagent] installed to $dir; open a new terminal to use eximagent (PATH was updated for new shells)"
}