client-finder/install.sh

18 lines
505 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
# Auto-install auth-rt if not found
_AUTH_RT_SRC="$HOME/.local/share/auth-runtime"
if ! command -v auth-rt &>/dev/null && [ ! -x "$HOME/.local/bin/auth-rt" ]; then
echo "auth-rt not found, installing..."
if [ -d "$_AUTH_RT_SRC/.git" ]; then
git -C "$_AUTH_RT_SRC" pull --ff-only
else
git clone --depth 1 http://192.168.0.108:3030/agent-skills/auth-runtime.git "$_AUTH_RT_SRC"
fi
bash "$_AUTH_RT_SRC/install.sh"
fi
npm install