diff options
| author | Henry-Joseph Audéoud <henry-joseph.audeoud@univ-grenoble-alpes.fr> | 2020-10-30 11:41:52 +0100 |
|---|---|---|
| committer | Eric Biggers <ebiggers3@gmail.com> | 2020-11-30 13:49:06 -0800 |
| commit | b74cd30fd7b0ebf30ef570f7bfa78dfcd62d80d5 (patch) | |
| tree | 2da385b30c00f509f16efca1c22508f960a0a282 /Makefile | |
| parent | cc933cdb51cb14dadd72217842e7a27854d63982 (diff) | |
bash-completion: add completion script
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -110,6 +110,7 @@ lint: $(BIN)/golint $(BIN)/staticcheck $(BIN)/misspell go list ./... | xargs -L1 golint -set_exit_status staticcheck ./... misspell -source=text $(FILES) + shellcheck -s bash cmd/fscrypt/fscrypt_bash_completion ( cd cli-tests && shellcheck -x *.sh) clean: @@ -158,8 +159,8 @@ coverage.out: $(BIN)/gocovmerge $(COVERAGE_FILES) @go test -coverpkg=./... -covermode=count -coverprofile=$@ -p 1 ./$* 2> /dev/null ###### Installation Commands (require sudo) ##### -.PHONY: install install-bin install-pam uninstall -install: install-bin install-pam +.PHONY: install install-bin install-pam uninstall install-completion +install: install-bin install-pam install-completion PREFIX := /usr/local BINDIR := $(PREFIX)/bin @@ -181,10 +182,16 @@ install-pam: $(PAM_MODULE) install -d $(DESTDIR)$(PAM_CONFIG_DIR) install $(PAM_CONFIG) $(DESTDIR)$(PAM_CONFIG_DIR)/$(NAME) +COMPLETION_INSTALL_DIR := $(PREFIX)/share/bash-completion/completions + +install-completion: cmd/fscrypt/fscrypt_bash_completion + install -Dm644 $< $(DESTDIR)$(COMPLETION_INSTALL_DIR)/fscrypt + uninstall: rm -f $(DESTDIR)$(BINDIR)/$(NAME) \ $(DESTDIR)$(PAM_INSTALL_PATH) \ - $(DESTDIR)$(PAM_CONFIG_DIR)/$(NAME) + $(DESTDIR)$(PAM_CONFIG_DIR)/$(NAME) \ + $(DESTDIR)$(COMPLETION_INSTALL_DIR)/fscrypt #### Tool Building Commands #### TOOLS := $(addprefix $(BIN)/,protoc golint protoc-gen-go goimports staticcheck gocovmerge misspell) |