make lint runs shellcheck on every tracked bash script, make test runs the bats suite in tests/, and make check runs both. The tests cover the update orchestrator (hook isolation, failure reporting, pull and free-space handling) and utils.sh (migrations, package install and removal, services, initramfs build check), using stub commands so they never touch the real system. Fixes from the first lint run: 20-aur.sh stops if a cd fails rather than building or deleting in the wrong directory, and 80-gnome-extensions.sh refuses to rm -rf with an empty path. The rest are false positives, silenced in .shellcheckrc or per line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
805 B
Bash
29 lines
805 B
Bash
#!/bin/bash
|
|
|
|
# configure reads TITLE and DESCRIPTION
|
|
# shellcheck disable=SC2034
|
|
TITLE="Hermes Agent"
|
|
# shellcheck disable=SC2034
|
|
DESCRIPTION="Choose a model provider and tools"
|
|
|
|
is_installed() {
|
|
[ -x "$HOME/.local/bin/hermes" ]
|
|
}
|
|
|
|
# Signed in with OAuth (e.g. Nous Portal), or an API key is set
|
|
is_configured() {
|
|
[ -s "$HOME/.hermes/auth.json" ] || grep -qE '^[A-Z_]*API_KEY=.+' "$HOME/.hermes/.env"
|
|
}
|
|
|
|
run_configure() {
|
|
echo " 1) Nous Portal (one sign-in covers the model, web search, images and more)"
|
|
echo " 2) Another provider (OpenRouter, OpenAI, Anthropic or your own endpoint)"
|
|
local choice
|
|
read -rp "Which provider? [1] " choice
|
|
case "$choice" in
|
|
""|1) unsandboxed hermes setup --portal ;;
|
|
2) unsandboxed hermes setup ;;
|
|
*) echo "Choose 1 or 2."; return 1 ;;
|
|
esac
|
|
}
|