fix: hartcodierte Repo-Pfade durch portable Alternativen ersetzen #17
@@ -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.
|
||||
|
||||
@@ -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
@@ -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 ---
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user