Skip to content

Commit

Permalink
added a Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushnix committed Sep 19, 2021
1 parent b12983d commit ca47f91
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PROG ?= tessen
PREFIX ?= /usr
DESTDIR ?=
LIBDIR ?= $(PREFIX)/lib
SYSTEM_EXTENSION_DIR ?= $(LIBDIR)/password-store/extensions
BASHCOMPDIR ?= $(PREFIX)/share/bash-completion/completions

all:
@echo "pass-$(PROG) is a shell script and doesn't need to be compiled"
@echo ""
@echo "To install it, enter \"make install\""
@echo ""

install:
@install -vd "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)" "$(DESTDIR)$(BASHCOMPDIR)"
@install -vm 0755 $(PROG).bash "$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash"
@install -vm 0644 "completion/pass-$(PROG).bash-completion" "$(DESTDIR)$(BASHCOMPDIR)/pass-$(PROG)"
@echo
@echo "pass-$(PROG) has been installed succesfully"
@echo

uninstall:
@rm -rf \
"$(DESTDIR)$(SYSTEM_EXTENSION_DIR)/$(PROG).bash" \
"$(DESTDIR)$(BASHCOMPDIR)/pass-$(PROG)"

.PHONY: install uninstall

0 comments on commit ca47f91

Please sign in to comment.