#!/usr/bin/env fish # copilot-bootstrap.fish # Fügt Copilot-Grundkonfiguration zu einem bestehenden oder neu geklonten Repo hinzu. # # Usage: # fish copilot-bootstrap.fish # aktuelles Verzeichnis # fish copilot-bootstrap.fish /path/to/repo # anderes Verzeichnis set TEMPLATE_DIR /home/rd13server/.git-templates set TARGET (test (count $argv) -gt 0; and echo $argv[1]; or echo (pwd)) if not test -d "$TARGET/.git" echo "Error: $TARGET is not a git repository" exit 1 end echo "Bootstrapping Copilot config in: $TARGET" # .github/copilot-instructions.md if not test -f "$TARGET/.github/copilot-instructions.md" mkdir -p "$TARGET/.github" cp "$TEMPLATE_DIR/.github/copilot-instructions.md" "$TARGET/.github/copilot-instructions.md" echo " ✓ .github/copilot-instructions.md created (fill in TODO sections)" else echo " ─ .github/copilot-instructions.md already exists, skipping" end # .vscode/settings.json if not test -f "$TARGET/.vscode/settings.json" mkdir -p "$TARGET/.vscode" cp "$TEMPLATE_DIR/.vscode/settings.json" "$TARGET/.vscode/settings.json" echo " ✓ .vscode/settings.json created" else echo " ─ .vscode/settings.json already exists, skipping" end # .vscode/extensions.json if not test -f "$TARGET/.vscode/extensions.json" mkdir -p "$TARGET/.vscode" cp "$TEMPLATE_DIR/.vscode/extensions.json" "$TARGET/.vscode/extensions.json" echo " ✓ .vscode/extensions.json created" else echo " ─ .vscode/extensions.json already exists, skipping" end echo "" echo "Done. Next steps:" echo " 1. Fill in TODO sections in .github/copilot-instructions.md" echo " 2. git add .github .vscode && git commit -m 'chore: add copilot workspace config'"