chore: initial commit

This commit is contained in:
Stevan Freeborn committed 2026-10-01 14:43:01 -05:00
commit 433471fd24
12 files changed
+1073

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
[CmdletBinding()]
param(
[Alias("v")]
[string]$Version,
[Alias("t")]
[string]$InstallDir = "$HOME\.onx\bin"
)
$ErrorActionPreference = "Stop"
$Existing = Get-Command "onx" -ErrorAction SilentlyContinue
if ($Existing) {
Write-Host "onx is already installed at: $($Existing.Source)" -ForegroundColor Green
& onx --version
exit 0
}
Write-Host "onx CLI not found in PATH. Installing via official installer..." -ForegroundColor Cyan
$InstallerUrl = "https://raw.githubusercontent.com/StevanFreeborn/onx/main/scripts/install.ps1"
$InstallScript = [scriptblock]::Create((Invoke-RestMethod -Uri $InstallerUrl))
$Params = @{
InstallDir = $InstallDir
}
if ($Version) {
$Params["Version"] = $Version
}
& $InstallScript @Params
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
if command -v onx >/dev/null 2>&1; then
echo "onx is already installed at: $(command -v onx)"
onx --version
exit 0
fi
echo "onx CLI not found in PATH. Installing via official installer..."
INSTALLER_URL="https://raw.githubusercontent.com/StevanFreeborn/onx/main/scripts/install.sh"
if command -v curl >/dev/null 2>&1; then
curl -fsSL "${INSTALLER_URL}" | bash -s -- "$@"
elif command -v wget >/dev/null 2>&1; then
wget -qO- "${INSTALLER_URL}" | bash -s -- "$@"
else
echo "Error: Neither curl nor wget was found." >&2
exit 1
fi