-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
40 lines (35 loc) · 1.32 KB
/
Makefile
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
PREFIX ?= /usr
DESTDIR ?=
LIBDIR ?= $(PREFIX)/lib
SYSTEM_EXTENSION_DIR ?= $(LIBDIR)/password-store/extensions
MANDIR ?= $(PREFIX)/share/man
BASHCOMPDIR ?= /etc/bash_completion.d
all:
@echo "pass-tail is a shell script and does not need compilation, it can be simply executed."
@echo ""
@echo "To install it try \"make install\" instead."
@echo
@echo "To run pass tail one needs to have some tools installed on the system:"
@echo " password store"
@echo " tail"
install:
@install -v -d "$(DESTDIR)$(MANDIR)/man1"
@install -v -m 0644 man/pass-extension-tail.1 "$(DESTDIR)$(MANDIR)/man1/pass-tail.1"
@install -v -d "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/"
@install -v -m0755 src/tail.bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/tail.bash"
@install -v -m0755 src/tailedit.bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/tailedit.bash"
@install -v -d "$(DESTDIR)$(BASHCOMPDIR)/"
@install -v -m 644 completion/pass-tail.bash.completion "$(DESTDIR)$(BASHCOMPDIR)/pass-tail"
@echo
@echo "pass-tail is installed successfully"
@echo
uninstall:
@rm -vrf \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/tail.bash" \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/tailedit.bash" \
"$(DESTDIR)$(MANDIR)/man1/pass-tail.1" \
"$(DESTDIR)$(BASHCOMPDIR)/pass-tail"
lint:
shellcheck -s bash src/tail.bash
shellcheck -s bash src/tailedit.bash
.PHONY: install uninstall lint