eve-watcher/install.ps1
2026-06-14 07:23:21 +00:00

40 lines
1.5 KiB
PowerShell

<#
install.ps1 — first-time bootstrap for the Eve watchers (Goliath + Adam's PC).
One-liner (PowerShell):
irm https://git.armoredarmadillo.com/brockdarnold/eve-watcher/raw/branch/main/install.ps1 | iex
Paste it ONCE and you're done forever: it git-clones the watcher repo into
%USERPROFILE%\eve-watcher, runs update.py, and update.py registers a Windows
Scheduled Task that auto-updates + restarts the watchers at every logon and
once a day. You never have to install or update again.
Your config.ini (webhook + OCR snip) is gitignored, so updates never touch it.
#>
$ErrorActionPreference = "Stop"
$repo = "https://git.armoredarmadillo.com/brockdarnold/eve-watcher.git"
$dir = Join-Path $env:USERPROFILE "eve-watcher"
function Need($cmd, $hint) {
if (-not (Get-Command $cmd -ErrorAction SilentlyContinue)) {
Write-Warning "$cmd not found. $hint"
exit 1
}
}
Need git "Install it: winget install --id Git.Git -e"
Need python "Install Python 3 from https://www.python.org (check 'Add to PATH'), then re-run."
if (Test-Path (Join-Path $dir ".git")) {
Write-Host "eve-watcher already cloned at $dir — pulling latest."
git -C $dir pull --ff-only
} else {
Write-Host "Cloning eve-watcher into $dir ..."
git clone $repo $dir
}
Set-Location $dir
python update.py
Write-Host ""
Write-Host "Installed at $dir."
Write-Host "Auto-update + auto-start is now a Scheduled Task (logon + daily) — nothing else to do."
Write-Host "One-time (per PC) for OCR hold alerts: cd $dir ; python eve_orehold_watcher.py --snip"