-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (26 loc) · 748 Bytes
/
Makefile
File metadata and controls
31 lines (26 loc) · 748 Bytes
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
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/share/kb/lib
TPLDIR = $(PREFIX)/share/kb/templates
HOOKDIR = $(PREFIX)/share/kb/hooks
.PHONY: install uninstall test lint
install:
@echo "Installing kb to $(PREFIX)..."
@mkdir -p $(BINDIR) $(LIBDIR) $(TPLDIR) $(HOOKDIR)
@cp bin/kb $(BINDIR)/kb
@chmod +x $(BINDIR)/kb
@cp lib/*.sh $(LIBDIR)/
@cp templates/* $(TPLDIR)/
@cp hooks/* $(HOOKDIR)/
@chmod +x $(HOOKDIR)/*
@echo "Done. Run 'kb help' to get started."
uninstall:
@echo "Removing kb from $(PREFIX)..."
@rm -f $(BINDIR)/kb
@rm -rf $(PREFIX)/share/kb
@echo "Done."
test:
@bash tests/run_all.sh
lint:
@shellcheck --exclude=SC2329,SC2317,SC2154,SC2034 bin/kb lib/*.sh tests/run_all.sh
@echo "ShellCheck passed."