AkurAI Build
Menu

AkurAI-Build

public

Latest change a38a67ccfdeda7e1f0e728047d06de4a9522fef1 - Fix self-deployed host tool installation by Ólafur Búi Ólafsson

#!/usr/bin/env sh
# Install AkurAI-Build maintained host tools into paths bind-mounted by the CI
# worker. When a packaged binary is present, update the stdio MCP executable
# atomically without interrupting an already-running MCP process.
set -eu
root="$(cd "$(dirname "$0")/.." && pwd)"
runtime="${1:-}"
bin="${AKURAI_HOST_BIN:-$HOME/.local/bin}"
cfg="$HOME/.config/akurai-build"
mkdir -p "$bin"
install -m 755 "$root/scripts/health-sweep.sh" "$bin/akurai-health-sweep"
install -m 755 "$root/scripts/bunx" "$bin/bunx"
if [ -x "$root/target/release/akurai" ]; then
  next="$bin/akurai-build-mcp.next"
  rm -f "$next"
  install -m 755 "$root/target/release/akurai" "$next"
  mv -f "$next" "$bin/akurai-build-mcp"
  echo "installed: $bin/akurai-build-mcp"
fi
if [ "$runtime" != "--runtime" ]; then
  mkdir -p "$cfg"
  install -m 644 "$root/deploy/environments.tsv" "$cfg/environments.tsv"
  echo "installed: $cfg/environments.tsv"
fi
echo "installed: $bin/akurai-health-sweep"
echo "installed: $bin/bunx"