forked from mylee04/code-notify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (49 loc) · 1.53 KB
/
Makefile
File metadata and controls
56 lines (49 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Makefile for Code-Notify
.PHONY: test install clean lint help
# Run the test suite
test:
@echo "Running tests..."
@./scripts/run_tests.sh
# Install locally for development
install:
@echo "Installing code-notify locally..."
@chmod +x bin/code-notify
@mkdir -p $(HOME)/.local/bin
@ln -sf $(PWD)/bin/code-notify $(HOME)/.local/bin/code-notify
@ln -sf $(PWD)/bin/code-notify $(HOME)/.local/bin/cn
@ln -sf $(PWD)/bin/code-notify $(HOME)/.local/bin/cnp
@echo "Installed. Make sure $(HOME)/.local/bin is in your PATH"
# Uninstall local installation
uninstall:
@echo "Removing local installation..."
@rm -f $(HOME)/.local/bin/code-notify
@rm -f $(HOME)/.local/bin/cn
@rm -f $(HOME)/.local/bin/cnp
@echo "Uninstalled."
# Clean up backup files and caches
clean:
@echo "Cleaning up..."
@rm -rf $(HOME)/.config/code-notify/backups/*
@echo "Cleaned."
# Basic shell script linting (requires shellcheck)
lint:
@echo "Linting shell scripts..."
@if command -v shellcheck >/dev/null 2>&1; then \
shellcheck bin/code-notify lib/code-notify/**/*.sh; \
else \
echo "shellcheck not installed. Install with: brew install shellcheck"; \
exit 1; \
fi
# Show help
help:
@echo "Code-Notify Makefile"
@echo ""
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " test - Run the test suite"
@echo " install - Install locally for development"
@echo " uninstall - Remove local installation"
@echo " clean - Clean up backup files"
@echo " lint - Run shellcheck on scripts"
@echo " help - Show this help message"