SHiNE-server/tools/understand-anything-lab/install_codex_skills.sh

30 lines
1.2 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
UPSTREAM_DIR="$SCRIPT_DIR/upstream"
if [[ ! -d "$UPSTREAM_DIR/.git" ]]; then
echo "Не найден локальный upstream-клон: $UPSTREAM_DIR" >&2
echo "Сначала выполните:" >&2
echo " git clone --depth 1 https://github.com/Lum1104/Understand-Anything.git \"$UPSTREAM_DIR\"" >&2
exit 1
fi
if ! command -v node >/dev/null 2>&1; then
echo "Не найден Node.js. Для полноценного запуска Understand Anything нужен Node.js 22+." >&2
exit 1
fi
if ! command -v pnpm >/dev/null 2>&1; then
echo "Не найден pnpm. Для полноценного запуска Understand Anything нужен pnpm 10+." >&2
echo "Skills можно установить, но команда /understand не соберёт core без pnpm." >&2
fi
UA_DIR="$UPSTREAM_DIR" "$UPSTREAM_DIR/install.sh" codex
echo
echo "Skills Understand Anything установлены для Codex из локального клона."
echo "Перезапустите Codex-сессию перед использованием /understand."