Files
akai-utils/scripts/install-deps.sh
T
david f804ad8a41 feat: expanded toolchain check + install-all task
check-toolchain.sh now covers:
- golangci-lint
- npm
- web/ui node_modules (JS deps)
- electron node_modules (electron deps)

New install-all task (scripts/install-deps.sh):
- mise install (go, node, golangci-lint)
- cd web/ui && npm install
- cd electron && npm install

Usage:
  mise run check-toolchain   # audit everything
  mise run install-all       # install all deps from scratch
2026-06-22 03:08:40 -07:00

45 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Install all project dependencies — run after check-toolchain.sh for a plan.
# Usage: ./scripts/install-deps.sh
set -euo pipefail
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
cmd() { echo -e " ${YELLOW}${NC} $*"; "$@"; }
skip() { echo -e " ${GREEN}${NC} $1 (already installed)"; }
fail() { echo -e " ${RED}${NC} $1"; exit 1; }
echo "=== Installing Dependencies ==="
echo ""
# ─── mise tools ─────────────────────────────────────────────────────────
echo "mise tools (go, node, golangci-lint):"
if command -v mise &>/dev/null; then
cmd mise install
else
fail "mise not found — run: curl https://mise.run | sh"
fi
echo ""
# ─── web/ui JS deps ─────────────────────────────────────────────────────
echo "web/ui npm deps (eslint):"
if [ -f web/ui/package.json ]; then
cmd cd web/ui && npm install
else
skip "web/ui npm deps"
fi
echo ""
# ─── electron deps ──────────────────────────────────────────────────────
echo "electron npm deps:"
if [ -f electron/package.json ]; then
cmd cd electron && npm install
else
skip "electron npm deps"
fi
echo ""
echo "=== Install complete ==="