ai-control: Migrationsskript für Linux (Pool private aus synced Repo)
This commit is contained in:
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
# migrate-linux.sh — richtet ~/.config/ai-control auf dieser Maschine so ein,
|
||||
# wie es auf dem Mac für das Projekt ai-control steht (übrige Projekte später).
|
||||
# Quelle ist das synced Repo ~/claude-projects/pool (CLAUDE.md, settings.json,
|
||||
# commands, Runtime) — deshalb: erst pullen, dann ausführen.
|
||||
# Überschreibt vorhandene Config; lokale Test-Sessions im Pool werden verworfen.
|
||||
set -euo pipefail
|
||||
|
||||
config="$HOME/.config/ai-control"
|
||||
poolrepo="$HOME/claude-projects/pool"
|
||||
pooldir="$config/pools/private"
|
||||
|
||||
mkdir -p "$config/icons" "$pooldir"
|
||||
|
||||
# App-Settings — wie auf dem Mac
|
||||
cat > "$config/settings.json" <<'EOF'
|
||||
{
|
||||
"claudeCommand": "claude-sync",
|
||||
"poolSyncDir": "~/claude-projects/pool"
|
||||
}
|
||||
EOF
|
||||
|
||||
# Registry: erst mal nur ai-control
|
||||
cat > "$config/projects.json" <<'EOF'
|
||||
{
|
||||
"ai-control": "~/claude-projects/ai-control"
|
||||
}
|
||||
EOF
|
||||
|
||||
# Pool private: Identität + User-Scope aus dem synced Repo
|
||||
cat > "$pooldir/pool.json" <<'EOF'
|
||||
{
|
||||
"name": "private",
|
||||
"credentialType": "oauth"
|
||||
}
|
||||
EOF
|
||||
cp "$poolrepo/settings.json" "$pooldir/settings.json"
|
||||
cp "$poolrepo/CLAUDE.md" "$pooldir/CLAUDE.md"
|
||||
rm -rf "$pooldir/commands"
|
||||
cp -R "$poolrepo/commands" "$pooldir/commands"
|
||||
|
||||
# Runtime (projects/todos/history.jsonl) aufs synced Repo verlinken —
|
||||
# damit funktionieren Resume und History maschinenübergreifend
|
||||
"$poolrepo/bin/link-pool-runtime" private
|
||||
|
||||
echo "migriert: $config (Projekt ai-control, Pool private)"
|
||||
Reference in New Issue
Block a user