completion: Install with Makefile

This commit is contained in:
Dylan Araps 2018-05-30 21:31:13 +10:00
parent 530928186f
commit 455dfa1b73

View file

@ -1,5 +1,6 @@
PREFIX ?= /usr
MANDIR ?= $(PREFIX)/share/man
COMDIR ?= $(PREFIX)/share/bash-completion/completions
all:
@echo Run \'make install\' to install Neofetch.
@ -7,10 +8,13 @@ all:
install:
@mkdir -p $(DESTDIR)$(PREFIX)/bin
@mkdir -p $(DESTDIR)$(MANDIR)/man1
@mkdir -p $(DESTDIR)$(COMDIR)
@cp -p neofetch $(DESTDIR)$(PREFIX)/bin/neofetch
@cp -p neofetch.1 $(DESTDIR)$(MANDIR)/man1
@cp -p completions/neofetch-completion.bash $(DESTDIR)$(COMDIR)/neofetch
@chmod 755 $(DESTDIR)$(PREFIX)/bin/neofetch
uninstall:
@rm -rf $(DESTDIR)$(PREFIX)/bin/neofetch
@rm -rf $(DESTDIR)$(MANDIR)/man1/neofetch.1*
@rm -rf $(DESTDIR)$(COMDIR)/neofetch