Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-27T23:30:30.036Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

install-rustup.ps1

40 lines · 1.3 KB · text
1# Checks if cargo is in the user's path or in default install path
2# If not, download with rustup-installer (which respects CARGO_HOME / RUSTUP_HOME)
3
4# Like 'set -e' in bash
5$ErrorActionPreference = "Stop"
6
7$cargoHome = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { "$env:USERPROFILE\.cargo" }
8$rustupPath = "$cargoHome\bin\rustup.exe"
9$cargoPath = "$cargoHome\bin\cargo.exe"
10
11# Check if cargo is already available in path
12if (Get-Command cargo -ErrorAction SilentlyContinue)
13{
14    cargo --version
15    exit
16}
17# Check if rustup and cargo are available in CARGO_HOME
18elseif (-not ((Test-Path $rustupPath) -and (Test-Path $cargoPath))) {
19    Write-Output "Rustup or Cargo not found in $cargoHome, installing..."
20
21    $tempDir = [System.IO.Path]::GetTempPath()
22
23    # Download and install rustup
24    $RustupInitPath = "$tempDir\rustup-init.exe"
25    Write-Output "Downloading rustup installer..."
26    Invoke-WebRequest `
27        -OutFile $RustupInitPath `
28        -Uri https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
29
30    Write-Output "Installing rustup..."
31    & $RustupInitPath -y --default-toolchain none
32    Remove-Item -Force $RustupInitPath
33
34    Write-Output "Rust installation complete."
35    # This is necessary
36}
37
38& $rustupPath --version
39& $cargoPath --version
40
Served at tenant.openagents/omega Member data and write actions are omitted.