Initial commit
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# link-pool-runtime <pool> — hängt projects/todos/history.jsonl eines Pools auf
|
||||
# das synced Repo (~/claude-projects/pool/<pool>/) um. Verwirft vorhandenen
|
||||
# Inhalt. NUR bei idlem Pool laufen (keine offene Session).
|
||||
set -euo pipefail
|
||||
pool=${1:?Aufruf: link-pool-runtime <pool>}
|
||||
SRC="$HOME/.config/ai-control/pools/$pool"
|
||||
DATA="$HOME/claude-projects/pool/$pool"
|
||||
[ -d "$SRC" ] || { echo "Pool fehlt: $SRC" >&2; exit 1; }
|
||||
mkdir -p "$DATA/projects" "$DATA/todos"
|
||||
[ -e "$DATA/history.jsonl" ] || : > "$DATA/history.jsonl"
|
||||
for n in projects todos history.jsonl; do
|
||||
if [ -d "$SRC/$n" ] && [ ! -L "$SRC/$n" ]; then rm -rf "$SRC/$n"; else rm -f "$SRC/$n"; fi
|
||||
ln -s "$DATA/$n" "$SRC/$n"
|
||||
done
|
||||
echo "verlinkt: $pool"
|
||||
Reference in New Issue
Block a user