mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-06 05:35:46 +02:00
4899b71e19
bin/dev-setup creates .claude/skills/gstack symlink to the working tree so Claude Code discovers skills locally. bin/dev-teardown cleans up. DEVELOPING_GSTACK.md documents the workflow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
40 lines
946 B
Bash
Executable File
40 lines
946 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Remove local dev skill symlinks. Restores global gstack as the active install.
|
|
set -e
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
SKILLS_DIR="$REPO_ROOT/.claude/skills"
|
|
|
|
if [ ! -d "$SKILLS_DIR" ]; then
|
|
echo "Nothing to tear down — .claude/skills/ doesn't exist."
|
|
exit 0
|
|
fi
|
|
|
|
# Remove individual skill symlinks
|
|
removed=()
|
|
for link in "$SKILLS_DIR"/*/; do
|
|
name="$(basename "$link")"
|
|
[ "$name" = "gstack" ] && continue
|
|
if [ -L "${link%/}" ]; then
|
|
rm "${link%/}"
|
|
removed+=("$name")
|
|
fi
|
|
done
|
|
|
|
# Remove the gstack symlink
|
|
if [ -L "$SKILLS_DIR/gstack" ]; then
|
|
rm "$SKILLS_DIR/gstack"
|
|
removed+=("gstack")
|
|
fi
|
|
|
|
# Clean up empty dirs
|
|
rmdir "$SKILLS_DIR" 2>/dev/null || true
|
|
rmdir "$REPO_ROOT/.claude" 2>/dev/null || true
|
|
|
|
if [ ${#removed[@]} -gt 0 ]; then
|
|
echo "Removed: ${removed[*]}"
|
|
else
|
|
echo "No symlinks found."
|
|
fi
|
|
echo "Dev mode deactivated. Global gstack (~/.claude/skills/gstack) is now active."
|