diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-15 16:56:39 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-15 16:56:39 -0500 |
| commit | 69c5e4ace81586c05dea6a9a3afd54dafa61a73b (patch) | |
| tree | 6deab67c2a373736d5095ae9b8373c3df2add7a7 /Makefile | |
| download | rulesets-69c5e4ace81586c05dea6a9a3afd54dafa61a73b.tar.gz rulesets-69c5e4ace81586c05dea6a9a3afd54dafa61a73b.zip | |
Squashed 'claude-templates/' content from commit f116888
git-subtree-dir: claude-templates
git-subtree-split: f1168885580e9197dcf57b57644eb576fdca2ab1
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e097cc2 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +.DEFAULT_GOAL := help + +PREFIX ?= $(HOME)/.local/bin +SRC := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) + +.PHONY: help install uninstall list test-scripts + +help: + @printf 'claude-templates — session launcher + project seed\n\n' + @printf 'Targets:\n' + @printf ' make install symlink bin/ai into %s\n' "$(PREFIX)" + @printf ' make uninstall remove the symlink\n' + @printf ' make list show installed symlink\n' + @printf ' make test-scripts run pytest + ERT suites under .ai/scripts/tests/\n' + +install: + @mkdir -p $(PREFIX) + @chmod +x $(SRC)/bin/ai + @ln -sfn $(SRC)/bin/ai $(PREFIX)/ai + @printf 'installed %s/ai -> %s/bin/ai\n' "$(PREFIX)" "$(SRC)" + +uninstall: + @if [ -L $(PREFIX)/ai ]; then \ + rm $(PREFIX)/ai; \ + printf 'removed %s/ai\n' "$(PREFIX)"; \ + else \ + printf '%s/ai is not a symlink; nothing to remove\n' "$(PREFIX)"; \ + fi + +list: + @ls -la $(PREFIX)/ai 2>/dev/null || printf 'not installed\n' + +test-scripts: + @cd $(SRC)/.ai/scripts/tests && python -m pytest + @set -e; for f in $(SRC)/.ai/scripts/tests/test-*.el; do \ + [ -e "$$f" ] || continue; \ + echo "ert: $$(basename "$$f")"; \ + emacs --batch -q -L $(SRC)/.ai/scripts -l ert -l "$$f" -f ert-run-tests-batch-and-exit; \ + done |
