Files
Rules/install.sh
T
PapaTramp 7f8e7c0cb2 init-cursor: авто-bootstrap git на новом ПК, install.ps1 с Gitea.
Один вызов init-cursor настраивает SSH при необходимости и копирует rules в проект.
2026-06-18 11:23:30 +10:00

18 lines
653 B
Bash
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
# Первая загрузка с Gitea: clone Rules и запуск init-cursor в текущем проекте.
set -euo pipefail
RULES_DEST="${RULES_DEST:-$HOME/CursorRules}"
HTTPS_URL="${HTTPS_URL:-https://git.kalinamall.ru/PapaTramp/Rules.git}"
if [[ ! -d "$RULES_DEST/.git" ]]; then
echo '[*] Cloning Rules from Gitea (HTTPS, login once if asked)...'
[[ -e "$RULES_DEST" ]] && { echo "Path exists and is not a git repo: $RULES_DEST" >&2; exit 1; }
git clone --depth 1 "$HTTPS_URL" "$RULES_DEST"
echo "[+] Cloned to $RULES_DEST"
fi
# shellcheck source=/dev/null
source "$RULES_DEST/init-cursor.sh"
init-cursor "$@"