From 98862a21b6d5cffa223f3746d948b8363651f88f Mon Sep 17 00:00:00 2001 From: Ali Karbassi Date: Sun, 29 Mar 2020 14:53:42 -0500 Subject: [PATCH] Allow setting of bash completion path (#301) Fixes #242 --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d2ceff2b..0bdcf741 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ endif ifdef BASH_COMPLETION datarootdir = $(BASH_COMPLETION) else - datarootdir = $(prefix)/share + datarootdir = $(prefix)/share/bash_completion.d endif # Dynamically detect/generate version file as necessary @@ -64,22 +64,22 @@ clean: test-pre-clean install: installdirs $(INSTALL_PROGRAM) todo.sh $(DESTDIR)$(bindir)/todo.sh - $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/bash_completion.d/todo + $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo [ -e $(DESTDIR)$(sysconfdir)/todo/config ] || \ sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > $(DESTDIR)$(sysconfdir)/todo/config uninstall: rm -f $(DESTDIR)$(bindir)/todo.sh - rm -f $(DESTDIR)$(datarootdir)/bash_completion.d/todo + rm -f $(DESTDIR)$(datarootdir)/todo rm -f $(DESTDIR)$(sysconfdir)/todo/config - rmdir $(DESTDIR)$(datarootdir)/bash_completion.d + rmdir $(DESTDIR)$(datarootdir) rmdir $(DESTDIR)$(sysconfdir)/todo installdirs: mkdir -p $(DESTDIR)$(bindir) \ $(DESTDIR)$(sysconfdir)/todo \ - $(DESTDIR)$(datarootdir)/bash_completion.d + $(DESTDIR)$(datarootdir) # # Testing @@ -100,4 +100,5 @@ test: aggregate-results rm -rf tests/test-results # Force tests to get run every time -.PHONY: test test-pre-clean aggregate-results $(TESTS) \ No newline at end of file +.PHONY: test test-pre-clean aggregate-results $(TESTS) +