aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-11 11:32:40 -0500
committerCraig Jennings <c@cjennings.net>2026-06-11 11:32:40 -0500
commitd576fc217ba304b48dfb1c54b92bc1849397fd9b (patch)
tree83c38f109409eccb524cdf5fe1ee37e91b5dc60d /Makefile
parent7095d622ab6e295143d1306bdb5c8ecd85cf0745 (diff)
downloadrulesets-d576fc217ba304b48dfb1c54b92bc1849397fd9b.tar.gz
rulesets-d576fc217ba304b48dfb1c54b92bc1849397fd9b.zip
fix(install): link default hooks in make install
session-clear-resume.sh shipped 2026-06-02 with its settings.json entry, but make install didn't cover hooks and nothing re-ran install-hooks, so the symlink only existed on machines that had linked it by hand. Everywhere else the hook errored silently on every /clear. make install now links DEFAULT_HOOKS alongside skills, rules, config, and bin scripts, so the startup workflow's install step propagates new hooks machine-wide. Opt-in hooks stay manual. scripts/tests/install-hooks-link.bats covers the new section. The SessionStart-on-clear todo task closes with this: the hook feature already existed, and the gap was distribution.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 33c582f..5ff155d 100644
--- a/Makefile
+++ b/Makefile
@@ -170,8 +170,8 @@ bootstrap: ## First-time machine setup: install + install-hooks + install-mcp
##@ Global install (symlinks into ~/.claude/)
-install: ## Symlink skills and rules into ~/.claude/
- @mkdir -p $(SKILLS_DIR) $(RULES_DIR)
+install: ## Symlink skills, rules, config, hooks, and bin scripts into place
+ @mkdir -p $(SKILLS_DIR) $(RULES_DIR) $(HOOKS_DIR)
@echo "Skills:"
@for skill in $(SKILLS); do \
if [ -L "$(SKILLS_DIR)/$$skill" ]; then \
@@ -220,6 +220,19 @@ install: ## Symlink skills and rules into ~/.claude/
fi \
fi
@echo ""
+ @echo "Hooks (default):"
+ @for hook in $(DEFAULT_HOOKS); do \
+ name=$$(basename $$hook); \
+ if [ -L "$(HOOKS_DIR)/$$name" ]; then \
+ echo " skip $$name (already linked)"; \
+ elif [ -e "$(HOOKS_DIR)/$$name" ]; then \
+ echo " WARN $$name exists and is not a symlink — skipping"; \
+ else \
+ ln -s "$(CURDIR)/$$hook" "$(HOOKS_DIR)/$$name"; \
+ echo " link $$name → $(HOOKS_DIR)/$$name"; \
+ fi \
+ done
+ @echo ""
@echo "bin scripts:"
@mkdir -p "$(LOCAL_BIN)"
@for src in $(CURDIR)/claude-templates/bin/*; do \