diff --git a/.agents/resume b/.agents/resume new file mode 100755 index 0000000..ddf85a5 --- /dev/null +++ b/.agents/resume @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Amp Orbs setup + +echo "No persistent services require resume" diff --git a/.agents/setup b/.agents/setup new file mode 100755 index 0000000..aab6fa3 --- /dev/null +++ b/.agents/setup @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# Amp Orbs setup + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$repo_root" + +export DISABLE_TELEMETRY=1 +export MISE_EXPERIMENTAL=true +export MISE_HTTP_TIMEOUT=120 + +if ! command -v shellcheck >/dev/null 2>&1; then + echo "Installing system packages" + apt=(apt-get) + if ((EUID != 0)); then + if ! command -v sudo >/dev/null 2>&1; then + echo "shellcheck is required, but setup cannot run apt-get as root" >&2 + exit 1 + fi + apt=(sudo apt-get) + fi + "${apt[@]}" update + "${apt[@]}" install -y shellcheck +fi + +echo "Installing mise" +if command -v mise >/dev/null 2>&1; then + mise_bin="$(command -v mise)" +else + installer="$(mktemp)" + trap 'rm -f "$installer"' EXIT + curl --fail --silent --show-error --location https://mise.run --output "$installer" + bash "$installer" + mise_bin="$HOME/.local/bin/mise" +fi + +if [[ ! -x "$mise_bin" ]]; then + echo "mise was not installed at $mise_bin" >&2 + exit 1 +fi + +profile_marker="# skills orb setup: activate mise" +if ! grep -Fqx "$profile_marker" "$HOME/.bash_profile" 2>/dev/null; then + cat >>"$HOME/.bash_profile" <