fix: hartcodierte Repo-Pfade durch portable Alternativen ersetzen

bootstrap.sh ermittelt REPO dynamisch, settings.json referenziert Hooks
über ~/.claude/hooks (Symlink), auto-format.sh löst die Markdownlint-Config
relativ zum Script-Standort auf. Doku-Beispiele nutzen Platzhalter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 19:19:01 +02:00
co-authored by Claude Opus 4.6
parent 62c094361f
commit 09860e32b0
5 changed files with 16 additions and 14 deletions
+5 -5
View File
@@ -11,11 +11,11 @@ Dieses Repository enthält die globale Claude-Code-Workflow-Konfiguration für a
### Neuer Rechner (2 Schritte)
```bash
git clone https://gitea.troeger-net.org/martin/claude-workflow.git /mnt/projekte/claude-workflow
/mnt/projekte/claude-workflow/bootstrap.sh
git clone https://gitea.troeger-net.org/martin/claude-workflow.git <pfad>
<pfad>/bootstrap.sh
```
Das Bootstrap-Skript erstellt alle Symlinks, prueft Voraussetzungen und zeigt fehlende Installationsbefehle an.
Der Pfad ist frei wählbar. Das Bootstrap-Skript erstellt alle Symlinks, prueft Voraussetzungen und zeigt fehlende Installationsbefehle an.
### Voraussetzungen
@@ -40,13 +40,13 @@ echo 'DEIN_TOKEN' > ~/.config/gitea/token && chmod 600 ~/.config/gitea/token
**Pushen (Rechner 1):**
```bash
cd /mnt/projekte/claude-workflow
cd <repo-pfad>
git add -p && git commit -m "..." && git push
```
**Übernehmen (Rechner 2):**
```bash
cd /mnt/projekte/claude-workflow && git pull
cd <repo-pfad> && git pull
```
Da alles über Symlinks verbunden ist, sind Änderungen sofort aktiv.
+2 -2
View File
@@ -7,8 +7,8 @@ Enthält Skills (`/go`, `/ship`, `/story`, `/plan-review`, `/workflow-review`),
## Einrichtung
```bash
git clone https://gitea.troeger-net.org/martin/claude-workflow.git /mnt/projekte/claude-workflow
/mnt/projekte/claude-workflow/bootstrap.sh
git clone https://gitea.troeger-net.org/martin/claude-workflow.git <pfad>
<pfad>/bootstrap.sh
```
Weitere Details in `CLAUDE.md`.
+3 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash
set -euo pipefail
REPO="/mnt/projekte/claude-workflow"
REPO="$(cd "$(dirname "$0")" && pwd)"
echo "=== Claude-Workflow Bootstrap ==="
@@ -27,8 +27,9 @@ ln -sf "$REPO/dotfiles/gitea-mcp-wrapper.sh" ~/.claude/gitea-mcp-wrapper.sh
chmod +x "$REPO/dotfiles/gitea-mcp-wrapper.sh"
echo " Dotfiles verlinkt"
ln -sfn "$REPO/hooks" ~/.claude/hooks
chmod +x "$REPO/hooks/"*.sh
echo " Hooks ausfuehrbar"
echo " Hooks verlinkt und ausfuehrbar"
# --- Voraussetzungen pruefen ---
+3 -3
View File
@@ -70,7 +70,7 @@
"hooks": [
{
"type": "command",
"command": "bash /mnt/projekte/claude-workflow/hooks/pre-bash-checks.sh",
"command": "bash ~/.claude/hooks/pre-bash-checks.sh",
"statusMessage": "Prüfe Bash-Sicherheitsregeln..."
}
]
@@ -82,7 +82,7 @@
"hooks": [
{
"type": "command",
"command": "bash /mnt/projekte/claude-workflow/hooks/auto-format.sh"
"command": "bash ~/.claude/hooks/auto-format.sh"
}
]
}
@@ -92,7 +92,7 @@
"hooks": [
{
"type": "command",
"command": "bash /mnt/projekte/claude-workflow/hooks/verify-on-stop.sh"
"command": "bash ~/.claude/hooks/verify-on-stop.sh"
}
]
}
+3 -2
View File
@@ -4,7 +4,8 @@
set -euo pipefail
# Dateiname aus Umgebungsvariable (Claude Code setzt CLAUDE_TOOL_INPUT_FILE_PATH)
REPO_ROOT="$(dirname "$(cd "$(dirname "$(readlink -f "$0")")" && pwd)")"
FILE="${CLAUDE_TOOL_INPUT_FILE_PATH:-}"
if [[ -z "$FILE" || ! -f "$FILE" ]]; then
@@ -39,7 +40,7 @@ case "$EXT" in
# Zweiter Pass: räumt die nun verwaisten Mehrfach-Leerzeilen auf (MD012).
for _ in 1 2; do
markdownlint-cli2 \
--config /mnt/projekte/claude-workflow/.markdownlint-cli2.jsonc \
--config "$REPO_ROOT/.markdownlint-cli2.jsonc" \
--fix "$FILE" >/dev/null 2>&1 || true
done
fi