Skip to content

Commit 1378c97

Browse files
authored
Allow setting of bash completion path (#301)
Fixes #242
1 parent 3d308a6 commit 1378c97

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030
ifdef BASH_COMPLETION
3131
datarootdir = $(BASH_COMPLETION)
3232
else
33-
datarootdir = $(prefix)/share
33+
datarootdir = $(prefix)/share/bash_completion.d
3434
endif
3535

3636
# Dynamically detect/generate version file as necessary
@@ -64,22 +64,22 @@ clean: test-pre-clean
6464

6565
install: installdirs
6666
$(INSTALL_PROGRAM) todo.sh $(DESTDIR)$(bindir)/todo.sh
67-
$(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/bash_completion.d/todo
67+
$(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo
6868
[ -e $(DESTDIR)$(sysconfdir)/todo/config ] || \
6969
sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > $(DESTDIR)$(sysconfdir)/todo/config
7070

7171
uninstall:
7272
rm -f $(DESTDIR)$(bindir)/todo.sh
73-
rm -f $(DESTDIR)$(datarootdir)/bash_completion.d/todo
73+
rm -f $(DESTDIR)$(datarootdir)/todo
7474
rm -f $(DESTDIR)$(sysconfdir)/todo/config
7575

76-
rmdir $(DESTDIR)$(datarootdir)/bash_completion.d
76+
rmdir $(DESTDIR)$(datarootdir)
7777
rmdir $(DESTDIR)$(sysconfdir)/todo
7878

7979
installdirs:
8080
mkdir -p $(DESTDIR)$(bindir) \
8181
$(DESTDIR)$(sysconfdir)/todo \
82-
$(DESTDIR)$(datarootdir)/bash_completion.d
82+
$(DESTDIR)$(datarootdir)
8383

8484
#
8585
# Testing
@@ -100,4 +100,5 @@ test: aggregate-results
100100
rm -rf tests/test-results
101101

102102
# Force tests to get run every time
103-
.PHONY: test test-pre-clean aggregate-results $(TESTS)
103+
.PHONY: test test-pre-clean aggregate-results $(TESTS)
104+

0 commit comments

Comments
 (0)